-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
group block padding can't be set by theme.json
#33456
Comments
Hi This is what I am seeing: The 1rem padding works correctly as the default in the editors and front when it is set in theme.json. I disagree that the padding should only be present when a background color is used. The group block is often used as a container, independent of the background. I can see the benefit of being able to update the default padding specifically for when a background color is used, to have two different paddings, but that is not possible with theme.json right now. Without background color:With background color (both custom and preset) |
Thanks @carolinan for the reply and sorry for the slow acknowledgement, I got buried in another project and it took me a while before I could test this again. The problem for me seems to be that the The I'm on WP 5.8 and Gutenberg 11.3.0. |
I believe you need to set top, right, bottom and left values, instead of one single value.
(it would be nice if both worked but I don't think it does) |
Sorry, just realised the answer to that. My dev tools screengrab is from the front-end whereas yours was from the editor. Doh! In essence, it's fine in the editor but not on the front end. The Any suggestions? This might indicate a generalised issue with |
I retested, and I am also seeing different results in the editor vs the front now. |
So first a decision needs to be made about what the expected result is, if the theme.json default is intended to override the background color padding or not. Thoughts @oandregal ? |
#34854 a try to fix this. |
Description
Group block padding (with background color) can't be configured through
theme.json
.Step-by-step reproduction instructions
theme.json
:1rem
followingtheme.json
but is actually1.25em 2.375em
. The1rem
rule is output in the stylesheet (for.wp-block-group
) but is overridden.Expected behaviour
Padding should be
1rem
– and it should only apply to group blocks with a background. Maybe this requires a different syntax intheme.json
but this seems to be undocumented.Actual behaviour
Group block padding is set indiscriminately
1.25em 2.375em
, overriding anytheme.json
setting, and not specific to group blocks with background colour set.WordPress information
Device information
The text was updated successfully, but these errors were encountered: