Repository navigation
Closed
Labels
[Feature] Design ToolsTools that impact the appearance of blocks both to expand the number of tools and improve the experi[Feature] TypographyFont and typography-related issues and PRs[Type] Tracking IssueTactical breakdown of efforts across the codebase and/or tied to Overview issues.
Description
An overview issue to track fluid typography follow ups and enhancements.
Related:
Fluid typography base functionality
- Fluid Typography Option #24480
- Fluid typography: custom font sizes should be converted to fluid font sizes values #44758
- Fluid typography: convert server-side block support values #44762
- Fluid Typography: Fix bug in global styles where fluid clamp rules were not calculated for custom values #44761
- Fluid typography: convert font size inline style attributes to fluid values #44764
- Make custom font sizes appear fluid in the block editor when fluid typography is enabled #44765
- Fluid typography: covert font size number values to pixels #44807
- Fluid typography: ensure fontsizes are strings or integers #44847
- Search block: ensure font sizes values are converted to fluid in the editor #44852
- Fluid typography: add font size constraints #44957
- Fluid typography: custom values should be set as maximum font size #45504
- Fluid typography: add configurable settings for minimum font size to theme.json #42489
- Global styles: convert preset font size values to CSS vars #44967
- Fluid typography: use logarithmic scale factor to calculate a min font size #49707
- Fluid typography: use layout.wideSize as max viewport width #49815
- Fluid typography: add min and max viewport width configurable options #53081
- Fallback to default max viewport if layout wide size is fluid. #53551
- Fluid typography: do not calculate fluid font size when min and max viewport widths are equal #57866
Current improvements, fixes and extensions
- Fluid font size application is dependent on the global state #58135
- Fluid typography: Numerical values shall support "ref" data type for better design synchronization e.g. typography.fluid.maxViewportWidth = "ref": "settings.layout.contentSize" #53525
- Typography: Casting float value to string makes it comma separated in some locales (PHP version < 8) #57607
- Regression: clamp calculations are broken in the editor since Block editor: hooks: avoid getEditWrapperProps #56912 (comment)
Wishlist
- Add further config values. See comment and previous implementation. Or more control through filters. Max and min viewport have been already implemented in Fluid typography: add min and max viewport width configurable options #53081
Bugs, tasks, and issues not covered here
For bug reports and smaller tasks, we can use the [Feature] Typography issue label for tracking and visibility.
Closed unfixed
Reacted by Andrew Serong, annezazu, Paal Joachim Romdahl, Héctor, strarsis and okmttdhr, tada
Metadata
Metadata
Assignees
Labels
[Feature] Design ToolsTools that impact the appearance of blocks both to expand the number of tools and improve the experi[Feature] TypographyFont and typography-related issues and PRs[Type] Tracking IssueTactical breakdown of efforts across the codebase and/or tied to Overview issues.
Activity
eric-michel commentedon Jul 27, 2023
@ramonjd I have a quick question regarding #49815.
Is there a way to independently specify the maximum viewport width for fluid font size calculations? The change in 49815 will significantly reduce the width at which our font sizes will begin shrinking, and could break certain layouts on legacy sites. Going forward, I definitely support using
settings.layout.wideSizeas the maximum viewport width, but I would like to keep1600pxas the max value for existing sites just to avoid any possible issues.If this is something I can set in
theme.jsonright now on those older sites in anticipation of this PR becoming active in WP core, that would be super helpful.edit: Looking at the
theme.jsonschema, I don't see a setting for this. I think it would be very useful to make both values (the max and the min) for the calculation independently customizable for those who wish to do so.ramonjd commentedon Jul 28, 2023
Thanks for the question @eric-michel
This is something I wanted to do much earlier on. See comment and commit history of:
You're right, it's not possible to configure at the moment, unless you fiddle with the layout width.
I think it should be possible for theme authors to configure both the min and the max in theme.json. I've added a PR here to remind myself to come back to it 😄
porg commentedon Aug 10, 2023
Please integrate #53525 to section "Wishlist"
briceduclos commentedon Aug 12, 2023
@ramonjd Are there any plans to add the minimum font size factor as a configurable option in theme.json?
The min and max viewport width configurable options are a great improvement. Adding the min size factor would offer precise control over the responsiveness of font sizes. For my website, the current factor makes the curve move towards the minimum too slowly at the beginning and too quickly at the end.
ramonjd commentedon Aug 14, 2023
Thanks for the ping.
Allowing more config options was something that I explored in a previous, now closed, PR..
scaleFactoris definitely something that may be useful to tweak as it controls how fast the font sizes change between min and max limits.Another idea, and something I'd like to pursue, is leveraging filters to override some things.
It was decided to move slowly with this sort of stuff to provide room for more testing as every change as the potential to affect existing sites implementing the fluid font size system.
It's on the wishlist in the description of this tracking issue 👍🏻
annezazu commentedon Jan 24, 2024
Wanted to note adding this to the mix: #58135
ramonjd commentedon Feb 23, 2024
I'm going to close this tracking PR, as the main feature has been implemented since WordPress 6.1.
Subsequent bugfixes and stability updates are complete.
The outstanding issues can stand on their own.