Skip to content
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

Button Block Global Styles for Font Family overrides individual block setting. #42398

Open
Addison-Stavlo opened this issue Jul 13, 2022 · 1 comment
Labels
[Block] Buttons Affects the Buttons Block Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended

Comments

@Addison-Stavlo
Copy link
Contributor

On current Gutenberg trunk branch with Twenty-twenty-two theme (reproduced on other themes as well), the Block specific global styles "font family" setting for the Buttons block overrides the individual block inspector settings.

Steps to Reproduce

  • Go to Global Styles -> Blocks -> Button -> Typography. Set a font family.
  • Go to an individual button block and try to set a different font family in the block inspector.
  • See that it does not update and uses the block level global styles setting.

What I would expect:

Where we would expect individual block level settings to override the Global Styles block type setting.

What happens

Global Styles block type settings overrides individual block inspector settings.

@Addison-Stavlo Addison-Stavlo added [Type] Bug An existing feature does not function as intended [Block] Buttons Affects the Buttons Block Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Jul 13, 2022
@carolinan
Copy link
Contributor

I was able to confirm this.
The global style is applied to the link, wp-block-button__link.
The block style is applied to the wrapping div with a class name:
<div class="wp-block-button has-monospace-font-family"><a class="wp-block-button__link wp-element-button">blah blah</a></div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Buttons Affects the Buttons Block Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants