-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Description
Should particular fluid settings of a font size preset work if settings.typography.fluid is false or not set in theme.json?
Let's consider these settings as example:
{
"settings": {
"typography": {
"fontSizes": [
{
"fluid": {
"max": "60px",
"min": "30px"
},
"name": "Large",
"size": "59px",
"slug": "large"
},
{
"name": "Small",
"size": "1rem",
"slug": "small"
}
]
}
},
"version": 3,
"$schema": "https://schemas.wp.org/trunk/theme.json"
}In this case, the 'Large' font size preset fluid settings are ignored by the styles renderer because settings.typography.fluid isn't set. The same would happen if settings.typography.fluid is set to false. Fluid styles are only set if settings.typography.fluid is true.
Expected
If the particular font size preset has fluid settings defined, it should render the fluid styles because more specific settings take precedence over more general settings. In the case mentioned before, the global fluid setting is not even defined, so the more particular font size preset fluid settings should be used. What do you think?
If we think that the particular font size preset fluid settings should be respected if they are set explicitely we can close this another related issue because it won't be valid anymore: # 64765 Font size presets inconsistent with the global fluid typography setting
.
cc. @WordPress/gutenberg-design @WordPress/block-themers
Step-by-step reproduction instructions
- Use the theme.json settings of the example.
- Check that the 'Large' font size preset is not rendered as a fluid font size in CSS.
Screenshots, screen recording, code snippet
No response
Environment info
- Gutenberg trunk
- WordPress 6.6.1
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- Yes