292 questions
0
votes
1
answer
62
views
Manual dark mode toggle, but by default it should follow the system scheme
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, ...
1
vote
2
answers
54
views
OKLCH colors are converted to LAB colors when I start using Rolldown-Vite instead of Vite
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
1
answer
26
views
Disable automatic source detection when use `@tailwind utilities`
With shorthand import, this is easy:
@import "tailwindcss" source(none);
Although the documentation addresses what happens if I don't use @import "tailwindcss";:
https://...
0
votes
2
answers
55
views
Tailwind dark mode classes not working even though .dark class is applied [duplicate]
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....
-1
votes
1
answer
69
views
Tailwind css migration error: "Cannot apply unknown utility class" [closed]
I have a fairly large svelte kit tailwind project.
I updated all dependencies to latest, including TailwindCSS. My current dependencies are as follows:
{
"devDependencies": {
// ....
2
votes
1
answer
60
views
DaisyUI Navbar is generating scrollbar on fullpage site
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 ...
1
vote
1
answer
89
views
Tailwind CSS directives (@tailwind base) underlined as unknown in VS Code with Next.js project
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
78
views
Shipping a UI package alongside projects in a monorepo
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 ...
2
votes
1
answer
128
views
Tailwind CSS v4 Vite plugin through npm:vite Can't resolve 'tailwindcss' error
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
154
views
shadcn/ui - How to switch color theme?
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 ...
0
votes
1
answer
114
views
Using TailwindCSS v4 in Bun SSR - how can I integrate it?
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 ...
1
vote
1
answer
97
views
How to define variables with the new version of Nativewind v4?
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
26
views
The `max-w-prose` utility works with the value 65ch, but it’s not documented and cannot be disabled even with `--spacing-prose: initial;`
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 ...
0
votes
1
answer
69
views
React TailwindCSS only rendering in mobile view in production
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
1
answer
92
views
Why I Cannot apply unknown utility class `border-border`? CssSyntaxError: tailwindcss [duplicate]
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....