Open cmgustin opened 1 year ago
@cmgustin Thanks for spotting this issue. We will take a look and see if we can get you a patch soon.
@kurtcunningham much appreciated, thanks for the quick response!
@cmgustin What's the desired outcome? If you have a background color and an image, the image usually displays over the color.
Correct, the desired outcome would be to have the image display over the background color. Currently, I'm only seeing the image and the background color isn't showing up.
So you're looking to show a partially transparent image over a background color?
That's correct, sorry I should have clarified that. Our use case is that the user can set the background color of the block, then add a partially transparent background image that will display over the background color. The way it's currently set up, you can only have one or the other.
No worries at all. We just never ran into this particular use case. The Container block does support the opposite use case, using an image as a background and then applying a transparent background overlay (via Gutenberg's gradients, which is a bit awkward but works).
We use that bg color-over-image technique regularly here, so I'll have to have a think about how to support both use cases.
Issue: When using the container block, if both a background image and a background color are set, only the background image shows up. Looking at the CSS, it looks like the background image is set on the
background
property rather than thebackground-image
property, so it overrides thebackground-color
property.Steps to reproduce: Add a container block to a page, set a background color and a background image, then view the page. Only the background image will be visible and the background color property will be overridden.
Possible solution: Set the background image on the
background-image
property instead of thebackground
property.We're currently using the gutenblocks plugin on a production site and they're great, but I'm struggling with this bug. Would love an update or patch. Thanks!