-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Open
Labels
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Block] ButtonsAffects the Buttons BlockAffects the Buttons Block[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
Hey everyone,
Was playing around with the theme.json and noticed that if you set styles.blocks.core/button.spacing.padding.X
and styles.blocks.core/button.border.X
values in the theme.json - they work fine except when you set the outline style to the button, as this style triggers higher specificity css on the frontend. This only applies to the frontend, as the editor adds even higher specificity.
The only "workaround" I could find was to add !important to the theme.json padding values, but of course... 🤢
Step-by-step reproduction instructions
- Add a value to:
styles.blocks.core/button.spacing.padding.left
- Add two buttons in the editor. Set one to Outline style.
- Save and check the frontend
Screenshots, screen recording, code snippet
Environment info
Gutenberg 11.6.0
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
Labels
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Block] ButtonsAffects the Buttons BlockAffects the Buttons Block[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended