Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/filter-effects/empty-element-with-filter.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Filter Effects: filters on elements that otherwise have no visible content</title>
<link rel="match" href="reference/empty-element-with-filter-ref.html">
<meta name="assert" content="This test ensures we properly render filters on elements that otherwise have no visible content.">
<style>
.turbulent {
width: 160px;
height: 90px;
margin: 10px;
filter: url(#turbulence);
}
.visibleContent {
background-color: red;
}
</style>
<div class="turbulent visibleContent"></div>
<div class="turbulent"></div>
This test passes if both divs look the same.
<defs>
<filter id="turbulence" color-interpolation-filters="sRGB">
<feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2"/>
</filter>
</defs>
</svg>