Skip to main content
Filter by
Sorted by
Tagged with
10 votes
1 answer
7k views

I am using Tailwind CSS v4 and want to define custom colors that automatically switch between light and dark modes. Instead of using the dark: prefix for every class, I want to manage color changes ...
14 votes
3 answers
22k views

My tailwind.config.js in v3 looks like this, but I can't find a way to use it in v4: theme: { extend: { colors: { lightHover: '#fcf4ff', darkHover: '#2a004a', darktheme: '#...
3 votes
4 answers
3k views

TailwindCSS v4 has changed significantly the light/dark theme design due to the removal of tailwind.config.js file. In TailwindCSS v3 this is how I changed the custom CSS properties depending on the ...
0 votes
1 answer
1k views

I want to add the theme switch functionality on my website, I know that how can we configures the theme change/toggle functionality using previous tailwind versions. But it would be appreciated if ...
9 votes
2 answers
14k views

I'm trying to set up a custom theme in Tailwind CSS v4 that auto-switches to dark mode without adding the dark: prefix to every custom class. In Tailwind v3, my setup was: index.css: :root { --...
-1 votes
1 answer
67 views

I have a fairly large svelte kit tailwind project. I updated all dependencies to latest, including TailwindCSS. My current dependencies are as follows: { "devDependencies": { // ....
0 votes
1 answer
59 views

So the documentation suggests that if I want a manual toggle, I should write it like this: If you want your dark theme to be driven by a CSS selector instead of the prefers-color-scheme media query, ...
0 votes
1 answer
26 views

With shorthand import, this is easy: @import "tailwindcss" source(none); Although the documentation addresses what happens if I don't use @import "tailwindcss";: https://...
15 votes
1 answer
31k views

I started a new project using the latest Vite and Tailwind. In version 4.0, I couldn't find the tailwind.config.js file, which made me confused about how to configure global types. Especially the ...
1 vote
2 answers
53 views

There is a Vite project using TailwindCSS v4. v4 already targets Baseline 2023 and correctly uses oklch() colors. Input CSS @theme { --color-demo: oklch(98% 0.006 251deg); } Generated CSS with Vite ...
0 votes
2 answers
55 views

I'm trying to implement dark mode in my Next.js app using TailwindCSS. However, TailwindCSS's dark: classes are not being applied, even when the .dark class is present on the <html> tag. global....
2 votes
1 answer
60 views

I'm using Vite v7.2.4, Tailwind v4.1.17 with DaisyUI v5.5.5. I'm trying to create a full page website where the Navbar will be always visible and the section will change. But every time I add a Navbar ...
0 votes
2 answers
2k views

Padding is just a specific example. The focus is on setting a default configuration and then overriding it with TailwindCSS. By default, I reset the padding of all elements to 0. After that, I expect ...
1 vote
2 answers
505 views

In TailwindCSS v3, the overrides still worked well, but from TailwindCSS v4 onward, it simply doesn't work, and Ant Design v5 always ends up being stronger. It seems this has to do with layers. How ...
1 vote
1 answer
88 views

I'm working on a Next.js 16 project and trying to set up Tailwind CSS v4. I installed Tailwind via npm: npm install -D tailwindcss postcss autoprefixer I also created the following config files ...
-3 votes
1 answer
77 views

Given a monorepo containing N projects, I wanted to avoid duplicating components, so I thought of creating a dependency package that only ships the components. However, if I install TailwindCSS in ...
0 votes
1 answer
4k views

I tried to configure a new project using React, TypeScript and TailwindCSS v4 but Tailwind isn't applying. Here is my installation: npx create-react-app web npm install --save-dev typescript @types/...
2 votes
1 answer
126 views

I have trouble on implementing TailwindCSS v4 on Deno. This is my structure: deno.json { "tasks": { "dev": "deno run -A --watch main.ts", "vite": &...
-5 votes
0 answers
151 views

I installed shadcn/ui to my Next.js project with the "neutral" theme selected. Now I want to switch it to the "slate" theme for my entire project. What should I do? Do I just copy ...
1 vote
1 answer
96 views

I've a problem with the Nativewind variables. I created my project on the new version of expo (sdk 54) and therefore nativewind v4 but there is no more file tailwind.config.js to put variables, only ...
0 votes
1 answer
113 views

The TailwindCSS website currently doesn't have any guidance related to Bun, so it's difficult for me to figure out how to properly integrate v4 with Bun SSR. I found a bun-plugin-tailwind dependency ...
25 votes
4 answers
67k views

10:04:32 PM [vite] Internal server error: [postcss] It looks like you're trying to use tailwindcss directly as a PostCSS plugin. The PostCSS plugin has moved to a separate package, so to continue ...
1 vote
1 answer
442 views

I wanted to use Tailwind and SCSS on my Nuxt site, but I noticed that the only way to make it work is if the file where I put @import is a CSS file; it doesn't work in an SCSS file. I don't understand ...
3 votes
2 answers
3k views

Since Tailwind v4 update, all @apply directives have ceased to function. The docs provide a workaround with @reference but the posted example is vague. I tried this but it doesn't work: <style lang=...
3 votes
1 answer
226 views

I'm using Angular v20 and Tailwind CSS v4. I have everything set up as per the documentation. Tailwind works great — for instance, if I define an element's class with a Tailwind utility class, the ...
22 votes
9 answers
29k views

I'm currently using Tailwind v3 in my Angular project (https://github.com/edissyum/opencapture/tree/dev_nch). Today I tried to upgrade to Tailwind v4, but without success. I didn't use PostCSS, I just ...
4 votes
3 answers
691 views

I've recently created a new Angular application (v20.3.0) and I installed TailwindCSS v4, using the Angular documentation guideline which is very simple to do (also TailwindCSS in its documentation ...
0 votes
1 answer
26 views

I have a project where I'm trying to remove the previously used @tailwindcss/typography plugin. I assumed that the max-w-prose utility was tied to the prose utility from that plugin, but after ...
1 vote
1 answer
91 views

This is my global.css @import "tailwindcss"; @layer base { :root { --background: 0 0% 100%; --foreground: 222.2 84% 4.9%; --card: 0 0% 100%; --card-foreground: 222.2 84% 4....
0 votes
1 answer
69 views

I have created a site using React with TailwindCSS v4.1.16. When running the site in dev mode (npm run dev), the responsive design is working and I can see the changing formats when I resize my screen ...
1 vote
2 answers
127 views

I am working on migrating a code base from Styled Components to Tailwind v4. To avoid introducing breaking changes to our design, I want to continue using the same media breakpoints and media queries, ...
3 votes
2 answers
241 views

I'm using ShadCN UI, Radix UI with TailwindCSS v4. I noticed that Tailwind classes don't work unless I add !important. For example: <section className="bg-gray-100 !px-15 !pt-15 !pb-20 rounded-...
4 votes
1 answer
8k views

I'm setting up a new project using Next.js (v15.3.0 - Pages Router) and Tailwind CSS (v4.1.4) and I've hit a persistent build issue where Tailwind utility classes are not being recognized. The Core ...
2 votes
1 answer
2k views

Trying to install Tailwind 4.0 full standalone CLI following their own documentation here: Standalone CLI: Use Tailwind CSS without Node.js - TailwindCSS Blog I copy and paste the example for macOS ...
0 votes
1 answer
3k views

I followed all the steps mentioned in the Tailwind v4 docs, to setup TailwindCSS v4 with parcel . After setup when i am running local server then i got this error. Server running at http://localhost:...
1 vote
1 answer
142 views

I'm creating a "component" package that uses Tailwind utilities. For example, inside the package, I declare components like Button (./components/Button.tsx) and Input (./components/Input.tsx)...
0 votes
1 answer
159 views

I'm working on a Vue 3 monorepo with the following structure: packages/ └── ui/ ├── src/ │ ├── components/ │ │ └── *.vue │ └── assets/ │ └── tailwind.css └── ...
-3 votes
2 answers
2k views

I was trying to get tailwindcss to work in my nuxt 4 application. There is no proper documentation for the same. After wasting 4 hours of my life asking chat GPT which did not help I finally got the ...
16 votes
4 answers
35k views

I am trying to install the tailwind in react project but while creating tailwind.config.js file I am having this issue. This is the error I am facing npx tailwindcss init -p npm error could not ...
14 votes
14 answers
12k views

I've intsalled Tailwind CSS v4 (released in Jan'25) in VSCode project (Vite): npm install tailwindcss @tailwindcss/vite Now the Tailwind CSS Intellisense extension in VSCode is not working. It is not ...
22 votes
7 answers
39k views

I've been using TailwindCSS for my projects for a long time, and I'm used to first installing the package and then creating the tailwind.config.js file using the init process. I did the same for ...
2 votes
1 answer
6k views

When I run this project using npm run dev, then my output errors: [vite] Internal server error: Failed to load PostCSS config Error: Cannot find module 'tailwindcss' [vite] Internal server error: [...
0 votes
2 answers
2k views

I have been trying to install vite with tailwindcss, but I keep getting this error: [vite] Internal server error: [postcss] It looks like you're trying to use tailwindcss directly as a PostCSS plugin....
2 votes
2 answers
3k views

How to make Angular 19+, PrimeNG 19+, and Tailwind 4+ work together? My configuration: package.json { "name": "web", "version": "0.0.0", "...
0 votes
1 answer
256 views

I'm using TailwindCSS v4.0.x, and @source inline safelist doesn't work with either the CLI, PostCSS, or even the Vite plugin: https://tailwindcss.com/docs/detecting-classes-in-source-files#...
18 votes
4 answers
12k views

How to make a safelist in TailwindCSS v4? As of now tailwind v4 preferable configuration is to use CSS. Not a .config.js anymore. But even if I use the JS-based configuration, the safelist property is ...
10 votes
1 answer
9k views

I just started learning Tailwind and I watched a tutorial. At first, the command npx tailwindcss init, which creates a file tailwind.config.js, didn't work for me. Error: Invalid command: init. This ...
0 votes
3 answers
1k views

I'm curious when I create next-app with tailwind 4.0 but I choose to not put app folder inside of src, when I use tailwind property in any element it will not applying style text-red-400, text-white, ...
1 vote
1 answer
4k views

How can implement dark mode in TailwindCSS v4 using Vite in React project? I did the below code but it didn't work? vite.config.js import { defineConfig } from 'vite' import react from '@vitejs/plugin-...
1 vote
1 answer
210 views

I would like to overwrite some of DaisyUI components using CSS. For example, I would like to overwrite the .input font-size. Inside my components.css file I put the CSS styles but they are add first ...

1
2 3 4 5 6