-
| Hello @theme { --text-md: 1rem; --text-md--line-height: 1.5; --text-md--color: var(--color-primary); /* custom */ } /* compiled */ .text-md { font-size: var(--text-md); line-height: var(--tw-leading, var(--text-md--line-height)); color: var(--text-md--color); }I tried it as shown below, but it doesn't seem to work. @utility text-* { color: --modifier(--color-*, [color], [*]); }Is there another way? |
Beta Was this translation helpful? Give feedback.
Answered by wongjn Oct 27, 2025
Replies: 2 comments 3 replies
-
| @layer components { u can use it like this...this ll work..ive tested it.... |
Beta Was this translation helpful? Give feedback.
2 replies
-
| You'd need to use |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by dungsil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You'd need to use
--value()along with--text-*--color. This would correspond to the theme token value: https://play.tailwindcss.com/E994wcIuDs?file=css