Skip to content

Buttons Block: Theme style seems to be overridden #41918

@iamtakashi

Description

@iamtakashi

Description

I've realised recently the style of buttons on a site has changed, and it seems to be the theme style is overridden with the following CSS.

.wp-element-button, .wp-block-button__link {
    background-color: #32373c;
    color: #fff;
    font-size: 1.125em;
    text-decoration: none;
}

This issue can be seen in multiple themes, and it doesn't appear to be a theme-specific issue. The button appears as expected in the editor, but not on the front of the site. If I deactivate the Gutenberg plugin, the theme style comes back.

Step-by-step reproduction instructions

  1. Go to the editor and add a button with a Buttons block.
  2. See the block on the front of the site.

Screenshots, screen recording, code snippet

Remote Theme

Without plugin With plugin
Screenshot 2022-06-23 at 17 51 52 Screenshot 2022-06-23 at 17 51 44

Twenty Twenty-two Theme

Without plugin With plugin
Screenshot 2022-06-23 at 17 52 06 Screenshot 2022-06-23 at 17 52 00

Environment info

WordPress 6.0
Gutenberg trunk
Chrome Mac

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions