Base support for text-smaller and text-larger #19709
andrilla-francis
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
I agree that these are useful for relative scaling, especially when you want to maintain the hierarchy within nested components. While adding them to For anyone looking for an immediate "utility-first" fix without touching the CSS file, you can use:
However, if we want this in the base theme, the implementation should ideally handle the line-height scale as well to prevent leading issues. Proposed configuration for your CSS theme block: @theme {
--font-size-smaller: smaller;
--font-size-larger: larger;
} |
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.
-
Maybe I'm the only one, but in most of my projects I use
font-size: smaller;and/orfont-size: larger;, neither of which Tailwind offers classes for by default. I don't mind adding them to my globals.css file myself, since it's as simple asbut I still think they're fairly simple and should be in the base theme.
Beta Was this translation helpful? Give feedback.
All reactions