-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 API makes impossible to set a fixed font-size #42698
Comments
Thanks for reporting! This is intended behaviour since 00c51d1. Related discussion starts around here. I had originally designed things to work as you describe in this issue. What do folks think? cc @mtias @scruffian |
Yes, this is intended. Would an explicit |
Yep, I think that could work. |
Alternatively could you set a min and max which are the same? |
Good point. This also works out of the box. 🎉 I'm happy to throw a PR up so there's an explicit |
I'm experimenting with this feature now, and without looking at the I was able to solve the issue by setting edit: I'm way behind, clearly 😁 #42757 |
Description
If you add
"fluid": true,
in yourtheme.json
you are not able to set static font size. I would expect to be able to set a fixed font size if I haven't defined,min
and/ormax
settings. The current behavior makes it impossible to mix fluid and static font sizes definition as in the following example:If you add a static font size, as the
default
font size defined in the previous snippet, it is rendered as a fluid font size even though I haven't definedfluid.min
orfluid.max
as this:--wp--preset--font-size--default: clamp(0.9375rem, 0.9375rem + ((1vw - 0.48rem) * 1.803), 1.875rem);
I would expect:
--wp--preset--font-size--default: 1.25rem;
Step-by-step reproduction instructions
default
font size defined to a blockScreenshots, screen recording, code snippet
No response
Environment info
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
The text was updated successfully, but these errors were encountered: