-
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
Option in theme.json to (completely) disable typography controls on block level #59730
Comments
Hi This combination works for me in my test:
I see that the font size is still available as a menu item when I open the "Typography options" from the three dot menu in the block's typography panel, even though the control itself never shows. That does seem like a bug. |
I tested one more thing, for your use case, you probably also want to turn off the font size for the heading elements. It may be a non-issue for scenarios where you are using a classic theme, or you are using a block theme and you want an administrator to have access but not editors. But it would be good to be able to completely disable it. |
Hey @carolinan - thanks for taking a look into this.
You're right, and I learned something today. I have, indeed, tested it in But this is is a quiet 'yay', because we still have
👍I couldn't agree more. |
Can't this be achieved with Curating the Editor experience with client-side filters – WordPress Developer Blog See "Restricting settings by block attributes" section |
Thank you for sharing the article. |
Hey @t-hamano , thanks for this share - awesome article, and, actually, the availability of this filter is a solution of the issue described in this feature request. @carolinan , I need your opinion here 🙂 - while I can use the What do you think, does the solution described in the artice mean this ticket is to be closed - or let's keep it open with the hope that, one day, support for the requested feature will be added to the |
Personally, I think it would be better to close this issue and submit the following two issues:
|
Yes, I have opened a separate issue for the first: #59732 |
What problem does this address?
Typography controls configuration in
theme.json
doesn't work properly.The example I tested is the
fontSizes
setting, with the following scenario:settings
section)core/heading
block where I want fix font sizescore/heading
block only - but this is currently impossible.I tested the following variations:
"fontSize: false"
"fontSizes: false"
"fontSize: []"
"fontSizes: []"
... in all possible combos, and by applying these combos
styles
section for thecore/heading
blockelements
section for theh1
elementNone of these variations work, it seems that, currently, it's impossible to disable the font size selector on block level if/when the
fontSizes
array in thesettings
section is not an empty array (or if it's not set to false).What is your proposed solution?
The proposed solution is an option in
theme.json
to completely disable typography controls on block level.The text was updated successfully, but these errors were encountered: