Backdrop filter defined in SVG is not showing up in Safari and Chrome browsers

Exploring an interesting example (taken from this source), showcasing the application of the same feTurbulence/feDisplacementMap SVG filter to two HTML elements. One element uses a CSS filter(), while the other employs a CSS backdrop-filter(). On Chrome, both elements display the distortion correctly; however, on Firefox and Safari, only the one utilizing filter() shows the effect, leaving the one with backdrop-filter() unaffected.

.modal {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 5px;
  color: #333;
  font-family: sans-serif;
  line-height: 1.5;
  max-width: 50%;
  padding: 1rem 2rem;
  backdrop-filter: url(#filter-turbulence);
  background-color: rgba(255, 255, 255, 0.5);
}

.modal p:last-child {
  filter: url(#filter-turbulence);
}

/* misc. irrelevant styles for demo */
html, body { height: 100%; width: 100%; } body { background-image: url('https://41.media.tumblr.com/efd15be8d41b12a7b0ef17fba27c3e20/tumblr_mqqy59HMaf1qzattso1_1280.jpg'); background-position: center center; background-repeat: no-repeat; background-size: cover; } .container { align-items: center; display: flex; justify-content: center; height: 100%; width: 100%; } a { color: #bf0222; }
<svg height="0">
  <defs>
    <filter id="filter-turbulence">
      <feTurbulence
        type="turbulence"
        baseFrequency="0.01"
        numOctaves="4"
        result="turbulence"
      />
      <feDisplacementMap
        in2="turbulence"
        in="SourceGraphic"
        scale="30"
        xChannelSelector="R"
        yChannelSelector="G"
      />
    </filter>
  </defs>
</svg>

<div class="container">
  <div class="modal">
    <p>The background behind these paragraphs uses a SVG filter with backdrop-filter(). The background behind it should be distorted.</p>
    <p>This paragraph uses a SVG filter with filter(). The text should be distorted.</p>
  </div>
</div>

The debugging process has been challenging as Safari and Firefox do accept the filter in filter(), but not in backdrop-filter(). Moreover, no error messages are generated in the console or CSS inspector of either browser.

Attempts with simpler SVG filters confirm that Chrome and Safari support SVG backdrop-filters, especially effects like blur/desaturate. However, there seems to be difficulty rendering any combination of feTurbulence and/or feDisplacement within a backdrop-filter in these browsers.

Are there possible errors in how my filters are defined that cause Chromium to tolerate them while other browsers reject? Or could there be some limitations in the backdrop-filter implementations of other browsers that I haven't discovered yet?

Answer №1

Backdrop-filter is currently only supported in Firefox's graphics path known as webrender.

Currently, webrender can only handle CSS filters. However, there is a possibility of utilizing SVG filters within CSS filter chains to enable backdrop-filtering with SVG. If this integration is not feasible, the option may be abandoned.

The presence of a filter element like feComponentTransfer that lacks a CSS filter equivalent can cause the entire backdrop-filter process to fail. Conversely, a filter such as feGaussianBlur that can be translated into blur() functions properly.

In the future, it is anticipated that the capabilities of webrender will be expanded to accommodate more SVG filters.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The standard bootstrap navbar does not automatically create spacing for content below it

Hey there everyone, I’m facing an issue with my responsive bootstrap menu. When I click the toggle button to open the dropdown menu, it doesn’t push the other content down like it should. Instead, it just overlaps the content. I’ve been trying to sol ...

What is the best way to position a div with the 'inline-block' attribute inside another div element?

What is the best way to position the .square elements inside the #about_container? The squares should be aligned 10px from the top of #about_container, regardless of whether there is text present. #about_container { position: absolute; width: 100%; ...

Using HTML and CSS to create nested divs floating to the left while also incorporating a

I'm trying to create a simple effect where a fixed height and width div contains a series of child divs that can be scrolled horizontally. However, the children are not floating as expected in the following code: .a {width:200px; height:200px; ...

The combination of jQuery, using .load method in javascript to prevent scrolling up, making XMLHttpRequest requests, updating .innerHTML elements, and troubleshooting CSS/JS

While utilizing this code, CSS and Javascript are disabled (only HTML loads): function loadContent(limit) { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (xhttp.readyState == 4 && xhttp.status ...

Learn how to cycle through three different texts that appear in the same spot using smooth transitions

I am working with three different rows that contain the Typography component. My goal is to display the first row, followed by the second, then the third, and back to the first one in a continuous loop. All three rows should be shown in the same location, ...

Circular shapes inside a button created without using a canvas in HTML and JavaScript

I'm looking to design a button similar to the one demonstrated in this example. While I like how it appears, I prefer not to use canvas as it is not visually pleasing. Is there a way to achieve this without using canvas, or should I stick with it? Be ...

Enhance Your SVG Elements with Angular Tooltips

I am faced with a challenge on my website where I have an SVG element: <ellipse id="svg_2" cy="78.999999" cx="1042.499999" stroke-width="1.5" stroke="#000" fill="#fff"/> My goal is to add a tooltip to this specific element. I attempted using NGPrim ...

"Step-by-step guide for incorporating a right-to-left (RTL) Bootstrap

Is there a way to make my bootstrap navbar right-to-left (RTL)? I want the logo to be on the right and the links to flow from right to left. I've tried various tricks but none of them seem to work. Here's the code I currently have: <nav class ...

Looking to implement a CSS banner image for seamless customization across multiple pages

Is it possible to change the banner image easily in the CSS without having to update every HTML page? I don't want the image source to be directly on the HTML pages. How can this be achieved? Additionally, there are already two references in the CSS: ...

Generate a purposely filled css grid with excessive content

I am attempting to design a horizontal scrolling widget that resembles an image carousel but with text and icons. This widget will contain multiple columns, but only one will be visible at a time while the others will have 'overflow: hidden'. T ...

Ways to avoid an element from overflowing in css

As I embark on the journey of creating a logo and a menu icon for my header, I am encountering an issue where they always exceed the specified height of the header. This unexpected overflow is causing me some frustration. I am aware that using the overflo ...

Disable the :hover functionality for mobile devices

While I have successfully implemented the :hover event on my website, I am facing difficulties when it comes to using this feature on mobile devices. Is there a way to disable this functionality through CSS or JavaScript? Despite numerous attempts, I have ...

The button effortlessly transforms into a sleek email submission form

I have a button that is already styled with basic CSS properties for active and hover states. I would like to add functionality so that when the "Join the Loop" button is clicked, it transforms into a simple email form similar to the one found at Apologie ...

HTML elements have a delayed rendering process in ReactJS

As I dive into learning ReactJS by creating a ReactJS version of my blog, I encountered an interesting issue while testing Google Page Speed. The recommendation to "prioritize visible content" led me to add a placeholder article with a loading message, lor ...

I am experiencing an issue wherein after using jquery's hover() function, the CSS :hover state is not

Following the jquery hover function, the css hover feature ceases to work. In my html, there are multiple svg elements. A jquery script is applied where hovering over a button at the bottom triggers all svg elements to change color to yellow (#b8aa85). S ...

Can you explain the contrast between susy-breakpoint and susy-media?

Is there a specific reason to pass a new grid as the second argument of susy-breakpoint? Why not simply use susy-breakpoint without the second argument? When would you choose to use susy-media instead of susy-breakpoint? For more information, refer to: ...

Ways to align my image to the left and text to the right using Bootstrap

body{ height: 100%; font-size: 1rem ; } .navbar-brand{ font-family: 'Syne Mono', monospace; color: black; size: 0.5rem; } header { width: 100%; height: 100vh; background: rgb(237,104,104); background: linear-gradient(90d ...

Aligning the column to the right to ensure the text is centered horizontally on the screen

<div className={css.title} > <div className={css.row}> <div className={css.columnLeft}> <div className={css.header}>Images</div> </div> <div className={css.col ...

When bootstrap buttons are displayed inside a Vue component, there should be no spacing between them

Is this issue specific to the vue-loader or is it more related to webpack builds in general? Consider a basic HTML page with Bootstrap 4 loaded and two buttons added: <button type="button" class="btn btn-primary">Primary</button> <button t ...

The table in Firefox is not displaying and hiding correctly. It only shows the header when the button is pressed, but not the entire row

There seems to be an issue with Firefox when it comes to displaying and hiding my table. When the button is pressed, only the header appears but not the row. What I'm trying to achieve is that when the user clicks the button, both the column header w ...