-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
When font size is turned off in theme.json, the typography panel does not completely hide the font size option. #59732
Comments
I just stumbled onto this. Just some additional observations: There seem to be issues that are at least closely related: #50330 and #45273 Also this is a regression in WP 6.5 since I was able to completely disable all typography features before by having these settings in
Another curious thing I noticed is that in 6.4 it works in the block editor when editing post content: The Typography panel is gone. In 6.5 it stays in both cases. I then looked through the codebase but wasn't really sure where to look. One issue that stood out was that at some point the panels for global styles and block styles got merged. Considering the difference in behavior described above I am guessing this could be related: #47356 |
I investigated this further and what I noticed are basically two separate issues. The issue above, which should already be fixed with https://github.com/WordPress/gutenberg/pull/58409/files#diff-def0802a58e1512057e07b22af00a628023b325ea4bdf28a87b322529405cdf2R54-R59 And what I described above is another issue tracked in #61231 |
Wanted to bring attention to the work done to Add defaultFontSizes theme.json and how that allows theme authors to disable showing the default font sizes and show only custom options: #58409 Does this resolve the concern or do you want an ability to completely remove any font size typography controls? Can't tell if I'm missing something here :) |
I have retested, and this is indeed fixed in 6.6. |
Description
Developers can use theme.json to enable font sizes site wide. They can also remove them for a single block by setting
"customFontSize": false
and leaving the fontSizes array empty:"fontSizes": []
.This removes the font size control from the global styles block typography panel: Site Editor > Styles Sidebar > Blocks > Block name > Typography;
But not from the Typography panel when an individual block is selected.
Step-by-step reproduction instructions
Add the following to the
settings
section of theme.json:Open the block editor or site editor and add a heading block.
Open the Typography panel in the block settings panel (the inspector). Check if the font size options are present.
Screenshots, screen recording, code snippet
In this image, the Typography panel is expanded by default, but empty:
Environment info
WordPress 6.4.3, 6.5 RC.
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: