SOLVED: Gradient/Overlay broken on frontend

Browser: Chrome 110
OS: macOS
URL: Link to a page that illustrates this issue
Video: Short screen recording that illustrates this issue (free tool: jam.dev)

After updating to version 1.12.2, my gradients are broken on the frontend, although they look fine in the backend. I’m using external CSS loading. I tried switching to inline CSS, but the problem remained. I also regenerated the external stylesheet, but that didn’t help either. I found that changing the z-index property from -1 to any other value fixes the gradient. Please see the attached video for a demonstration.

2 Likes

Hi @emmanuelson,

yep, we changed how the overlay is applied in the latest version. In general, we added z-index:-1 to the :before and isolation:isolate to the element where you set the overlay (to create new stacking context).

I can’t reproduce the issue locally. Can you share a link to your website, so I can check?

Thanks.
Matej

I confirm i got the exact same problem with the last update. Gradian i put on image have go missing on plain image, but was still partialy visible if the image have transparency. So basicaly they are display with lower z-index that the image itself or something like that.

Only solution i found was to donwgrade to the 1.12.1 version.

1 Like

Hi @emmanuelson and @Iznogood,

thank you both. With the hint of @Iznogood, I was able to locate the isse. This is happening, if you add an overlay over the image element. I’ve created internal task for this.
For example, adding overlays over the Block element, with a background-image still works as expected.

As a workaround, you have a few options:

  1. You can unset the z-index on ::before pseudo-class, on the single image element
%root%::before{
  z-index: unset;
}
  1. You can unset the z-index on ::before pseudo-class, on all image elements. But you have to be careful, as this may mess with other settings, if you use ::before on image elements.
.brxe-image::before {
  z-index: unset;
}
  1. You can temporarily downgrade to the 1.12.1 version, until we fix this issue.

Thanks for understanding.
Matej

4 Likes

I had downgraded but reading this, i realized i was using an actual image as background image with z-index: -1 changing that to z-index: -2 solves the issue. But when using video backgrounds, the issue persists.

1 Like

HI,

thanks for this. I’ll add this to the task.
I suppose somethig like this should solve this overlay issue with the video:

%root% .bricks-background-video-wrapper {
	z-index: -2;
}
2 Likes

Same issue here. Is their plans to roll out a fix? Or should I adjust the z-index on my site now? I just dont want to have to undo everything if bricks will roll out a fix.

The easiest way to fix it is to downgrade to the previous version @websitestudios .

We are working on finding a solution to the problem and will let you know as soon as we have any news.

For me z-index:0; did the trick. Not the -2.

Hi,

thank you for this info. Can you share a link to your website, where you have this video background, so I can see how you set it up, and why -2 is not working in your case?

Thanks.
Matej

Yes, here it is: https://www.safedx.eu

Hello @alessykora,

I’ve reviewed your website, and if I set z-index in ::before back to -1, and if I set z-index of .bricks-background-video-wrapper to -2, it works.

Can you double check if you correctly applied the fix?

Please let me know. Thanks!

1 Like

I am sorry, I added the z-index to the ::before not to the wrapper. You are right.

And for the image background overlay? Datacenter DX: Spolehlivé služby pražského datacentra I use

.hero_content__background::before {
	z-index: 0;
}

Best regards, Aleš

Hey Aleš. Thanks for your response.

Yep, for image, setting z-index to 0 or event to unset should work as needed.

Best regards,
Matej

I have just figured out, that all clients updated sites are broken because of this new behavior. Hope this will be fixed. I am not sure, why updates like this comes. Because they just broke working things. Do you plan to revert this, or I need to manually go over 40+ websites and check every image and gradients…?

Hi @alessykora,

we are so sorry. If we knew that it would break gradient like this, we would definitely not push this update.

I see two ways to solve this:

  • Downgrade the websites to 1.12.1, especially if you don’t need any of the new features or fixes
  • Create a CSS snippet, that will fix this issue site-wide, and apply it to each page.

I know that no option is optimal, but those are the options I see.

Thank you for understanding,
Matej

That will hurt, did you have all those sites on auto-update? If yes, i never enable auto update for themes or plugins that have direct impact on the frontend appearance of a site.

I do, I pay for a product, which should work and updates shouldn’t broke such basic things, which were working, like overlays.

2 Likes

Same here. I had to literally create a new block, apply my gradient to the background, and overlay it with an absolute value.

Do you have an estimated time this will be fixed?

1 Like