Skip to content

PostCSS nesting with CSS variables isn't working in Tailwind CSS & Next.js #1584

Discussion options

You must be logged in to vote

The complete solution was to remove quotes & object notation in CSS. I copied the whole thing from CSS-in-JS but forgot to remove quotes & object notation aka :

tailwind.css

@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';

@layer base {
  :root {
    --font-mono: 'Fira Mono, monospace';

    --text-1: 12px;
    --text-2: 14px;

    --colors-black: rgba(19, 19, 21, 1);
    --colors-white: rgba(255, 255, 255, 1);
    --colors-gray: rgba(128, 128, 128, 1);
    --colors-blue: rgba(3, 136, 252, 1);
    --colors-red: rgba(249, 16, 74, 1);
    --colors-yellow: rgba(255, 221, 0, 1);
    --colors-pink: rgba(232, 141, 163, 1);
    --colors-turq: rgba(0, 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by deadcoder0904
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant