Don't use fluid layout value in typography calculation.#5006
Closed
tellthemachines wants to merge 3 commits intoWordPress:trunkfrom
Closed
Don't use fluid layout value in typography calculation.#5006tellthemachines wants to merge 3 commits intoWordPress:trunkfrom
tellthemachines wants to merge 3 commits intoWordPress:trunkfrom
Conversation
ramonjd
approved these changes
Aug 14, 2023
Member
ramonjd
left a comment
There was a problem hiding this comment.
Works for me. Thank you!
Before
2023-08-14.15.55.43.mp4
After
2023-08-14.15.56.04.mp4
Aside from the minor PHP lint warning (Expected 1 space before "?"; 2 found), I think the failing PHP test Tests_Theme_ThemeDir::test_theme_list is related. It's expecting Block Theme Child Theme With Fluid Layout in the array.
|
|
||
| // Defaults. | ||
| $default_maximum_viewport_width = isset( $layout_settings['wideSize'] ) ? $layout_settings['wideSize'] : '1600px'; | ||
| $default_maximum_viewport_width = isset( $layout_settings['wideSize'] ) && ! empty( wp_get_typography_value_and_unit( $layout_settings['wideSize'] ) ) ? $layout_settings['wideSize'] : '1600px'; |
Member
There was a problem hiding this comment.
Suggested change
| $default_maximum_viewport_width = isset( $layout_settings['wideSize'] ) && ! empty( wp_get_typography_value_and_unit( $layout_settings['wideSize'] ) ) ? $layout_settings['wideSize'] : '1600px'; | |
| $default_maximum_viewport_width = isset( $layout_settings['wideSize'] ) && ! empty( wp_get_typography_value_and_unit( $layout_settings['wideSize'] ) ) ? $layout_settings['wideSize'] : '1600px'; |
Fix PHPCS notice
Contributor
Author
|
Thanks for the reviews folks! Looks like all the tests are passing now. |
Contributor
Author
|
Committed to trunk in r56503; leaving this PR open for commit to the 6.3 release branch. |
Contributor
Author
|
Closing as this was committed to the 6.3 branch in https://core.trac.wordpress.org/changeset/56737 |
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.
Trac ticket: https://core.trac.wordpress.org/ticket/58754
Adds the PHP changes from WordPress/gutenberg#53551 and WordPress/gutenberg#53554 to core.
To test: using Twenty Twenty Three or another block theme with fluid typography enabled, change the value of
settings.layout.wideSizein theme.json to use a fluid value such asclamp(1000px, 85vw, 2000px). Check that font sizes remain fluid in the front end. (For the editor part, an npm package update will be required; that will be done separately.)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.