Scoping with [background,border,...]-color-* theme variables #17017
Unanswered
VincentCordobes
asked this question in
Help
Replies: 1 comment
-
Just noticed the question was asked here #16111 Maybe it would be worth mentioning this behavior in the documentation ? cc @philipp-spiess |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In Tailwind 4, the doc mentions that defining a theme variable like
--color-my-blue
generates utility classes such asbg-my-blue
andtext-my-blue
.I noticed we can "scope" colors by prefixing them. For example, the following code generates utility classes like
bg-button
andborder-input
, but notbg-input
norborder-button
, as one might expect.I'm happy to see it works that way, however, I couldn't find anything about this in the doc. It only mentions the
--color-*
namespace.Is this an intended and supported way to define theme variables?
Beta Was this translation helpful? Give feedback.
All reactions