Remove Section/Container/Block/Div "background-size: cover" default value when a background image is set

Bricks Version: 1.5

Right now, the Block, Div, Container has “background-size: cover” as default when a background image is set, which isn’t ideal when setting up custom class with a background-size to another value other than cover because the ID has a higher styling specificity.

Example of what I’m trying to do:

In this screenshot, I have this custom class set up as global style for a page hero section.

Then I would like to just select the element without the class and set a background image individually for each page.

However, this doesn’t work as you can see in this screenshot, the default styling has background-size set to cover by default. As the default value is styled using ID as a selector, the custom CSS class has a lower specificity than it.
image

IMO, this is a bug and the “background-size: cover” value should be removed. Although I know this can be tricky knowing how many websites are already built with this default value in mind.

While there are workarounds I can do to resolve this, Bricks shouldn’t be opinionated with background-size for basic building elements like Section, Container, Block, Div.

1 Like