Replies: 1 comment
-
|
Not sure if this is best solution, or if it helps you at all. I ended up creating a unique css var for the *-500 colors, then I could just reference in the @Utility.
Then my sample Utility definition: |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I try to upgrade from v3 to v4 and we did generate a lot of utilities using plugins and
matchUtilitieswith v3.Let's imagine that I had an utility class which would work like that:
.custom-background-redwould@apply bg-red-500;. Of course, i want to do that for all of the colors defined in my theme.The question is: how to write that with
@utilityand*I have tried many attempts like the following:
but nothing gave me what I want to achieve and there is not much documentation about
--valuecurrently.NB: If this is not the proper approach for this, please let me know, it is completely possible that I go the wrong way.
Thank you!
EDIT:
I found out that:
is working but i have to pass the full name of the color. It seems that if there is something after the * in value then it does not work. I want to be able to pass a color scheme name and the
@utilitydeals with the steps.Beta Was this translation helpful? Give feedback.
All reactions