-
Notifications
You must be signed in to change notification settings - Fork 360
Blockbase: Non default font families don't update text styling properly in Button block #5734
Comments
Nothing this may be a blockbase / universal-theme issue. |
cc @jeffikus to get this on your radar, some restricting font styles settings in blockbase break this functionality. |
This might be happening because we have a separate variable for buttons fonts in Blockbase (and children). This was primarily because many non-button-block buttons still needed to be styled with the same settings we were applying to button blocks. We're trying to transition out of needing to do that, however we might not have everything in place to accomplish this in WP 6 (sans-Gutenberg). |
I tested with the Fonts management change to Blockbase (which should be landing soon-ish). Changing the global button font-family worked as expected, but the per-block of the same wasn't working as expected. |
So the problem is a little deeper than just Blockbase. Setting the font-family attribute for the Button Block via theme.json or the Global Styles FSE form applies that font via the selector: This is a problem with Gutenberg rather than now Blockbase is built to customize buttons (except for the fact that Blockbase explicitly defines the Button block's font family). There may be a work-around for themes where the Button font-family is the default font. This may hopefully be fixed by transitioning to the Button |
Oo good find! I can repro as well on TT2 as well this way:
Where we would expect individual block level settings to override the Global Styles block type setting. |
WordPress/gutenberg#42398 - Gutenberg issue to track here |
Thank you @Addison-Stavlo! I'm going to close this issue as I don't think that Blockbase could/should do anything about it. Hoping for a speedy fix! |
Description
This appears to be a conflict with button block styling specificity, and not the webfonts API.
When a font is registered with the new webfonts API, the button block doesn't respect font selection.
Steps to reproduce
What you expected to happen
Selecting the newly registered web font would change the font family of the button text.
What actually happened
Selecting the newly registered web font did not change the font family of the button text.
The text was updated successfully, but these errors were encountered: