-
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: allow individual preset overrides #64790
Conversation
…ography is disabled or not active but an individual font preset does enable it, calculate the clamp value for that individual preset.
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: -31 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
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.
This is testing well for me.
I tried the opt-in of particular font size presets when the global settings.typography.fluid
isn't set and when it's set to false
. In both cases the individual font size presets defined in the settings.typography.fontSizes
array works as expected rendering the fluid CSS formula for the preset. I think this PR solved the inconsistency defined in #64766 so I think it's good to merge.
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.
Thanks for the PR! It's working as expected on the frontend and in the editor 👍
* This commit allows individual font preset overrides. So, if fluid typography is disabled or not active but an individual font preset does enable it, calculate the clamp value for that individual preset. Co-authored-by: ramonjd <ramonopoly@git.wordpress.org> Co-authored-by: matiasbenedetto <mmaattiiaass@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Resolves #64766
What?
This PR allows individual font preset overrides.
So, if fluid typography is disabled or not active but an individual font preset does enable it, calculate the clamp value for that individual preset.
Why?
Individual font sizes may opt out of fluid typography if it is turned on globally.
This PR does the opposite: individual font size presets can opt in to fluid typography if it is not turned on globally.
How?
Check if fluid settings on individual font size presets are present.
Testing Instructions
"fluid": true
to the preset object. See the below example theme.json.Here is some test theme.json