4 ms·
Switching the theme configuration to CSS variables makes a ton of sense. But what is the point of introducing a directive called "@theme{}" though for configur
by TIPSIO 3y ago
Switching the theme configuration to CSS variables makes a ton of sense.
But what is the point of introducing a directive called "@theme{}" though for configuration?
Why not just do ":root{}"?
- cantSpellSober 3y agoApparently they do that too > We also make all of your theme values available as native CSS variables in your custom CSS theme() makes using them more tailwind-y
- adamwathan 3y agoWe considered it but it felt too magical to make any CSS variable under `:root` automatically drive the existence of utility classes. Putting things under a custom at-rule like `@theme` makes that opt-in, because we know anything you put there is actually intended to drive your utility classes.
- TIPSIO 3y agoMakes sense! Thanks for the reply, Adam. Best of luck and thanks for driving progress forward with the project still.