-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fluid typography: add configurable settings for minimum font size to theme.json #42489
Conversation
dd173b3
to
7076ce9
Compare
24bfb63
to
29e3128
Compare
29e3128
to
5d96ecf
Compare
5d96ecf
to
8f789fc
Compare
Size Change: +101 B (0%) Total Size: 1.32 MB
ℹ️ View Unchanged
|
1335b9d
to
3fd570c
Compare
Fixed `typographySettings` check
Updating schema Changelogs
…ing custom font sizes and search block font sizes.
d4181e4
to
a998a1b
Compare
…t_typography_font_size_value(). In `wp_get_typography_font_size_value()`, adds support for using a minimum font size for fluid typography when defined in a theme's `theme.json` file. Reference: * Part of [WordPress/gutenberg#42489 Gutenberg PR 42489] Follow-up to [54497], [54260]. Props andrewserong, ramonopoly, hellofromTonya, joen. Fixes #57529. git-svn-id: https://develop.svn.wordpress.org/trunk@55133 602fd350-edb4-49c9-b593-d223f7449a82
…t_typography_font_size_value(). In `wp_get_typography_font_size_value()`, adds support for using a minimum font size for fluid typography when defined in a theme's `theme.json` file. Reference: * Part of [WordPress/gutenberg#42489 Gutenberg PR 42489] Follow-up to [54497], [54260]. Props andrewserong, ramonopoly, hellofromTonya, joen. Fixes #57529. Built from https://develop.svn.wordpress.org/trunk@55133 git-svn-id: http://core.svn.wordpress.org/trunk@54666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
…t_typography_font_size_value(). In `wp_get_typography_font_size_value()`, adds support for using a minimum font size for fluid typography when defined in a theme's `theme.json` file. Reference: * Part of [WordPress/gutenberg#42489 Gutenberg PR 42489] Follow-up to [54497], [54260]. Props andrewserong, ramonopoly, hellofromTonya, joen. Fixes #57529. Built from https://develop.svn.wordpress.org/trunk@55133 git-svn-id: https://core.svn.wordpress.org/trunk@54666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Dev note for 6.2Note: this feature might not need it's own standalone dev note if it looks like it could be combined with other features, as it's a fairly small feature. Fluid typography minimum font sizeFollowing on from the fluid typography settings that were introduced in WordPress 6.1, WordPress 6.1.1 introduced a hard-coded minimum for the fluid typography rules of In WordPress 6.2, themes can define their own minimum font size for fluid typography rules. Depending on the theme's requirements, sometimes the desired minimum font size value might be greater or less than the provided default of How to use minimum font size in your themeWithin
With the
The output for a paragraph block set to
Related reading
@bph here's a draft dev note for the fluid typography rules changes, I think this PR wasn't listed in the dev notes list, so I'll add it over there, too. This dev note also implicitly covers the changes from #45536, I believe. |
@andrewserong Thank you so much for your notes and updating the tracking issue. I added the Dev Note to the draft Misc Editor post |
…t_typography_font_size_value(). In `wp_get_typography_font_size_value()`, adds support for using a minimum font size for fluid typography when defined in a theme's `theme.json` file. Reference: * Part of [WordPress/gutenberg#42489 Gutenberg PR 42489] Follow-up to [54497], [54260]. Props andrewserong, ramonopoly, hellofromTonya, joen. Fixes #57529. Built from https://develop.svn.wordpress.org/trunk@55133 git-svn-id: http://core.svn.wordpress.org/trunk@54666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
What?
Part of
Follows on from #39529 by adding configurable fluid font-size settings.
The first setting to be added is
settings.typography.fluid.minFontSize
, which sets the lower bound at which custom font sizes are converted to clamp values.The current, hard-coded value is
14px
.Why?
The hard-coded value of
14px
may not be appropriate for some theme designs.How?
By checking global fluid typography for values.
Testing Instructions
Play with
minFontSize
in the fluid config settings (px/rem/em units only) and ensure that custom font sizes are only clamp above the value you set.sample editor code
Run the tests!
See also