-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
What problem does this address?
I am currently trying to move more and more away from ACF blocks in favour of core blocks, and today while setting up a header template part for my navigation, I wrapped it in a group block to enable the sticky functionality, added a white background colour so the navigation is still visible on scroll, and for some random reason there is padding now added to the group block on the basis that it has a background colour.
The CSS being applied:
:where(.wp-block-group.has-background) {
padding: 1.25em 2.375em;
}
There is already a padding UI setting for the group block so it makes no sense really for this opinionated CSS to be applied.
I can think of some use cases when this may be helpful but it is so easy to add in the UI, it doesn't seem necessary to have a blanket CSS rule on background colours.
What is your proposed solution?
Remove the unneccesary CSS targeting blocks when they have a background colour to apply padding.
It isn't needed and only gets in the way. I could very easily add padding, if that is what I needed or wanted. The opposite isn't true.