Font variation settings in tailwindcss v4 #17913
-
Hey there! I'm currently struggling with getting the CSS proeprty While these settings individually work with no issues:
I have a hard time understanding, how to make them work in conjunction, so that when I write for example
that they'll get merged into
I feel like I'm missing some information in the docs where it's described how to achieve these concatenated property values. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You could consider using CSS variables: https://play.tailwindcss.com/zq2Bvd4g3I?file=css. You may need to fiddle with the |
Beta Was this translation helpful? Give feedback.
-
After fiddling around for a little longer, I just so happend to find a solution, that tends to point towards the "I'm just plain dumb" solution: https://play.tailwindcss.com/jZUrbNXT8n?file=css. I guess, I couldn't wrap my head around how tailwind's mutating the variable values in the new version! Next thing for me to figure out is how to limit |
Beta Was this translation helpful? Give feedback.
After fiddling around for a little longer, I just so happend to find a solution, that tends to point towards the "I'm just plain dumb" solution: https://play.tailwindcss.com/jZUrbNXT8n?file=css.
(The preview errors at the custom variable, but it works in my repo)
I guess, I couldn't wrap my head around how tailwind's mutating the variable values in the new version!
Next thing for me to figure out is how to limit
--value(integer)
to specific ranges of numbers (e. g. 300 to 900) and to get my linter to suggest these classes.