-
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
Wordpress Ver 6.2 custom font size in editor not working properly #49993
Comments
Thanks for the report. If I understand correctly, this behavior is a bug. Even though the This problem can also be reproduced in Twenty Twenty Three. Enter a fixed value for font size in any of the blocks that support font size. Here, a fixed value of Stored styles remain fixed values.: However, the front end rewrites the value using the |
I may have misunderstood this. From the PRs such as #51516, it appears that it was intended that custom font sizes would be fluid as well. Is it intended that the custom font size be fluid if |
Thanks for the ping @t-hamano This is intentional behaviour and has been so since WordPress 6.1 |
Thanks for the reply! I would like to close this issue because this is expected behavior. If you have any questions, please feel free to comment. |
If its intentional behaviour, then this is not right I think, because in custom font size we can even provide fluid size values. Then why not we keep it as fixed values if needed for some particular size. This causing issue if we want a font somewhere fixed size. Let understand the complete scenario. @ramonjd and @t-hamano , Please check this particular behaviour in case of fluid font size. |
Thanks for the response. I believe the In that way it gives themes the freedom to opt in to fluid for the entire site, or, opt out and define their own clamp values in for font sizes in theme.json and let everything else be static. Custom font sizes will only be converted to clamp values where they are For context, see: So you could opt out of fluid typography and add your own custom cc @jasmussen for visibility. |
Also note that there has been talk of opening up UI controls for fluid type in the editor, so perhaps your concern might be addressed in future iterations. |
For now I am using Custom Attributes for blocks plugin, and adding inline style attribute to block to give me custom static font size to override fluid font size |
Description
custom font size in block editor not working properly in Wordpress ver. 6.2
How it should work => when we choose custom font size in block editor blocks sidebar settings, instead of choosing dropdown values we provided in json. It works like getting that exact font size, that we have provided in the setting.
How it is working => Currently if we choose a font size in custom font size box, that match with font size of any default drop down font size, its not overriding it and behaving like we have chosen the default font size. It should override Whatever we have provided in json. specially if we have made font sizes fluid in json, that causing big problem to keep any places fix font size for some special text.
see a demo page with issue here https://mall-world-rali.instawp.xyz/sample-page/
Step-by-step reproduction instructions
"fontSizes": [ { "fluid": false, "name": "Tiny", "size": "13px", "slug": "tiny" }, { "fluid": false, "name": "Extra Small", "size": "14px", "slug": "extra-small" }, { "fluid": false, "name": "Small", "size": "15px", "slug": "small" }, { "fluid": false, "name": "Normal", "size": "16px", "slug": "normal" }, { "fluid": false, "name": "Medium", "size": "17px", "slug": "medium" }, { "fluid": false, "name": "Medium", "size": "18px", "slug": "medium" }, { "fluid": { "max": "20px", "min": "19px" }, "name": "Large", "size": "19px", "slug": "large" }, { "fluid": { "max": "21px", "min": "17px" }, "name": "Huge", "size": "17px", "slug": "huge" }, { "fluid": { "max": "23px", "min": "20px" }, "name": "Extra Huge", "size": "20px", "slug": "extra-huge" }, { "fluid": { "max": "24px", "min": "21px" }, "name": "Custom Font 1", "size": "21px", "slug": "custom-font-size-1" }, { "fluid": { "max": "26px", "min": "22px" }, "name": "Custom Font 2", "size": "22px", "slug": "custom-font-size-2" }, { "fluid": { "max": "30px", "min": "25px" }, "name": "Custom Font 3", "size": "25px", "slug": "custom-font-size-3" }, { "fluid": { "max": "36px", "min": "27px" }, "name": "Custom Font 4", "size": "27px", "slug": "custom-font-size-4" } ]
Screenshots, screen recording, code snippet
No response
Environment info
`
wp-core
version: 6.2
wp-active-theme
name: Twenty Twenty-Three (twentytwentythree)
version: 1.1
wp-server
server_architecture: Linux 5.4.0-122-generic x86_64
httpd_software: Apache/2.4.56 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1f
php_version: 8.0.28 64bit
`
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: