Replies: 1 comment 1 reply
-
Yep, already exists in v4 but undocumented. Follows exactly your suggested syntax: https://play.tailwindcss.com/OKUULfj9f1 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We're currently migrating our project which always used CSS variables mapped back to the tailwind config in JS.
In v3 you're allowed to add values for specific properties like
backgroundColor
,textColor
,borderColor
, etc. I couldn't find related information in v4 docs. Perhaps it's already possible with v4 but not yet documented?(!)Main motivation for having this feature I believe is code readability:
bg-bg-primary
,text-text-primary
,border-border-primary
— without this feature this is what you would end up with. IMO these classes read really weird and unnatural.Perhaps a similar syntax could be introduced to address this issue:
Would be awesome if it's possible to achieve this in v4.
Beta Was this translation helpful? Give feedback.
All reactions