79828387

Date: 2025-11-24 08:04:55
Score: 1
Natty:
Report link

Your @theme inline block and custom CSS variables override all color utilities, but they don’t define Tailwind’s actual color tokens.

Tailwind generates .dark .text-primary { color: theme("colors.primary") }

But your global CSS overrides --primary and --primary-foreground directly inside .dark

And since your base layer forces:

* {
  @apply border-border outline-ring/50;
}

And:

body {
  @apply bg-background text-foreground;
}

Those use CSS variables, which override internal Tailwind utilities, including dark: variants.

Tailwind’s dark: variant only works if .dark is on <html> or <body>

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @theme
  • Low reputation (1):
Posted by: W. B.