Replies: 1 comment 1 reply
-
Hey, That's definitely an interesting idea! 💡 Since a few core plugins use the Good news is it's incredibly quick to extend the spacing scale with Thanks for sharing - again that's a pretty neat idea to have scalable "inline-with-text" icons 👍 |
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
Uh oh!
There was an error while loading. Please reload this page.
-
I often use SVG arrows and chevrons inline with other copy. I prefer when these SVGs scale with the surrounding font, because I feel prone to forgetting to change one when changing the other.
This is trivial to do by extending the space utilities with
text: '1em'
. That lets me write<p class="text-lg"><svg class="h-text w-text" ...
which usually makes SVGs that are approximately the right size, even as I change the font size of the paragraph. If I need more control over a particular SVG, I switch back to explicit sizes likeh-5
. (I don't like using em-based sizing for anything besides1em
, for the reasons described in #1953.)Is this technique useful enough and/or common enough to include
text: '1em'
in Tailwind's default spacing config?Beta Was this translation helpful? Give feedback.
All reactions