Fluid Typography Option #24480
Comments
This would be neat to consider — also cc @nosolosw @jorgefilipecosta for global styles and theme.json consideration. |
Following the suggestion, I gave in #24250 (comment). I think the attributes where we reference a fontSize, lineHeights, padding, margins, widths, etc... should all be strings (instead of multiple attributes one for values and other for units as we have now in some cases). If tomorrow CSS allows a new font size computation e.g: "font-size: next-size-computation( 10px, 10rm, ...). Themes would be able to use that mechanism right away without us needing to change any line of code (the value would be shown as a raw value). In a future version, we may then include a UI to edit that type of value if we think it has a big usage of is useful for building themes and patterns. |
+1 to that... I started working on a similar approach for column widths (see #24711 (comment)) |
It'd be nice to allow to have fluid typography option so that design would look good on all viewports. This would open the door for designers to make a more bold visual expression that's difficult to do with fixed font size.
@mtias told me about
clamp
https://developer.mozilla.org/en-US/docs/Web/CSS/clamp, and that looks a pretty good solution.Related #23323
The text was updated successfully, but these errors were encountered: