[wp-trac] [WordPress Trac] #57065: Fluid typography: custom values should be set as maximum font size, sizes below minimum shouldn't be clamped
WordPress Trac
noreply at wordpress.org
Thu Nov 10 18:26:08 UTC 2022
#57065: Fluid typography: custom values should be set as maximum font size, sizes
below minimum shouldn't be clamped
-------------------------+-----------------------------
Reporter: ramonopoly | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 6.1
Severity: normal | Keywords: needs-testing
Focuses: css |
-------------------------+-----------------------------
For 6.1.1
When converting custom font sizes to fluid values, the fluid typography
functions calculate the minimum and maximum font sizes either size of the
given custom font size.
Depending on the viewport width, the resulting fluid value may have a
maximum font size value larger than the original custom value.
This may contradict user expectations.
All custom values should act as the maximum value in a clamp() function.
For example, if 8px is the custom value provided, it would be the maximum
as would 1000px.
As for the minimum size, wherever the typography functions calculate one,
that is, a min font size is not specified by theme.json, do not clampify
font sizes <=14px. This is to prevent generating tiny font sizes.
See original Gutenberg issue in
https://github.com/WordPress/gutenberg/issues/45504
Related trac ticket that introduced fluid typography in 6.1:
https://core.trac.wordpress.org/ticket/56467
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57065>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list