In Tailwind v4, how can I define a configuration variable that depends on a runtime CSS variable? #17613
-
I am using Radix UI Themes in my app, and I'l like to be able to make some of the CSS variables it defines available in tailwind. For example, when I wrap my app in |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can use @theme inline {
--color-accent: var(--accent-9);
} Which for .bg-accent {
background-color: var(--accent-9);
} |
Beta Was this translation helpful? Give feedback.
You can use
@theme inline
like:Which for
bg-accent
, would compile to: