Is it possible to combine talwind daisyUI with CSS variables?

Viewed 421

Is it possible to combine tailwind daisyUI with CSS variables? like this? With DaisyUI

:root { --primary-color:#570df8; }

how to use something like this? which is not working,

  themes: [
      {
        mytheme: {
          primary: "var(--primary-color)", //not working
          "primary-focus": "#4506cb",
          "primary-content": "#ffffff",
          secondary: "#f000b8",
          "secondary-focus": "#bd0091",
          "secondary-content": "#ffffff",
        },
      },
    ],```
1 Answers

You should put:

:root { --primary-color:#570df8; }

after your @tailwind directives in your main style file.

Related