Core/Button .is-style-outline overwrites theme.json padding settings for default button padding #34853
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
So utilizing theme.json I am able to add styles to the
core/buttonas intendedThough when I change the button style to outline it now ignores my colors (obviously) but what I didn't expect is it overwrote my
theme.jsonpadding with its own padding.Here is the part of my
theme.jsonfileThis applies everything as expected but if in the wp-admin area you go and switch style to outline it adds the class
.is-style-outlinewhich then applies its own padding and overwrites my padding.With this in mind, my thought (though with a grain of salt) would be to either remove the padding from
.is-style-outlineand let it default to the.wp-block-button__linkstyles precede.This creates the problem though of the buttons not being equal in size with default stylings. As the
border: 2px solid;will increase the overall size by 4px.I also thought of maybe changing the border to outline.
Overall I'm not sure the best solution here but that it doesn't seem to be the best way of handling it.
A couple of of other thoughts I had was to have the theme.json file a way of targeting
.is-style-outlineUltimately I think this comes back to the hard coding of styles versus the direction we seem to be going with flexibility.
Step-by-step reproduction instructions
Set a padding in theme.json to apply to core/button
Set button to outline style.
Screenshots, screen recording, code snippet
No response
Environment info
No response
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: