Backport Fluid Typography settings for minimum font size#3866
Closed
andrewserong wants to merge 7 commits intoWordPress:trunkfrom
Closed
Backport Fluid Typography settings for minimum font size#3866andrewserong wants to merge 7 commits intoWordPress:trunkfrom
andrewserong wants to merge 7 commits intoWordPress:trunkfrom
Conversation
85 tasks
Contributor
|
CI failures due to a missing closing |
hellofromtonya
approved these changes
Jan 24, 2023
Contributor
hellofromtonya
left a comment
There was a problem hiding this comment.
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
Contributor
|
Committed via https://core.trac.wordpress.org/changeset/55133. |
Contributor
Author
|
Wonderful, thank you for landing this one, Tonya! 🙇 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR backports the PHP changes in this Gutenberg PR: WordPress/gutenberg#42489
The feature adds a
settings.typography.fluid.minFontSizeproperty totheme.jsonwhich allows themes to set a minimum font size for fluid typography calculations.Testing instructions
To test: edit the TT3 theme's
theme.jsonfile to swap outsettings.typography.fluidfrom 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, and20pxrespectively. 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.