-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Backport Fluid Typography settings for minimum font size #3866
Backport Fluid Typography settings for minimum font size #3866
Conversation
CI failures due to a missing closing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this PR backports the PHP changes only. The update to support this feature within the block editor will be backported as part of the usual JS packages update. It should be pretty safe to land this PHP change first.
Confirmed the PR does backport the PHP changes from Gutenberg's /lib/block-supports/typography.php
from Gutenberg's PR 42489 ✅
I agree that it is safe to land these PHP changes ahead of the package updates. Once the packages are updated, then minimum font size feature can fully tested.
Approving for commit.
53fcdfc
to
74588c3
Compare
Committed via https://core.trac.wordpress.org/changeset/55133. |
Wonderful, thank you for landing this one, Tonya! 🙇 |
This PR backports the PHP changes in this Gutenberg PR: WordPress/gutenberg#42489
The feature adds a
settings.typography.fluid.minFontSize
property totheme.json
which allows themes to set a minimum font size for fluid typography calculations.Testing instructions
To test: edit the TT3 theme's
theme.json
file to swap outsettings.typography.fluid
from its current boolean value tor an object that specifies a minimum font size. For example, the following sets the minimum font size to 15px:Then, in a post, create a few paragraphs and set a variety of custom font sizes. In the below screenshot of the markup, there are three paragraph blocks, set to
15px
,16px
, and20px
respectively. Notice how the first block does not have fluid rules applied, and for the second and third blocks, the minimum size is15px
:Note: this PR backports the PHP changes only. The update to support this feature within the block editor will be backported as part of the usual JS packages update. It should be pretty safe to land this PHP change first.
Trac ticket: https://core.trac.wordpress.org/ticket/57529
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.