-
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 font size bug #50929
Comments
The difference is in the Full Site Editor, not the page editor. |
In the Twenty Twenty-Three theme: One of these is wrong. |
This became apparent to me, because I am using different values (70px and 125px) which for some reason results in a -17.19 factor, which means the font size is always 70px no matter the screen size. It's less apparent in 2023, since that calc grows to 160px in both cases. Nevertheless, the value is incorrect, even if harder to notice. |
For the more dramatic values, use
to get this nonsense: |
This bug is still present in 15.9.0-rc.1 |
cc @ramonjd can you take a look? |
The regression is still present in 15.9.0 |
Thanks for reporting. 👀 now |
Indeed a bug, and as @WraithKenny describes. Fix over here: #51146 Thank you! |
The regression is still present in 16.0.0 |
In my theme, I was using
I assume that the fix didn't consider this use case, and did not fix it. |
What I don't really understand is how the Site Editor can get the value correct, even with a strange layout.contentSize value. Can't we just do that for everywhere else? |
What I think is happening is that |
CSS functions were never supported, but we should guard against them. I think the backend is the only place that doesn't. I'll update. Thank you for picking up on this! 🙇 |
Description
When using Gutenberg 15.8.1 on WordPress 6.2.2, and using a FSE Block Theme (theme.json), setting a fluid font-size is producing different values in the editor vs the theme side. (Reproduced on Twenty Twenty-Three, updated description.)
In the FSE editor, its outputting
--wp--preset--font-size--xx-large: clamp(4rem, 4rem + ((1vw - 0.2rem) * 7.5), 10rem);
and in the theme (and page editor), it's outputting
--wp--preset--font-size--xx-large: clamp(4rem, 4rem + ((1vw - 0.2rem) * 10.909), 10rem);
Difference being
7.5
vs10.909
I believe the FSE version is the correct value, and the page editor and theme side is incorrect.
Step-by-step reproduction instructions
Screenshots, 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: