summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/filter-effects/empty-element-with-filter.html
blob: 3e8fc7e164cde54a8ff81a241909c2f729f32afb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!DOCTYPE html>
<title>CSS Filter Effects: filters on elements that otherwise have no visible content</title>
<link rel="help" href="https://drafts.fxtf.org/filter-effects/#FilterProperty">
<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.

<svg xmlns="http://www.w3.org/2000/svg" width="0" height="0" version="1.1">
  <defs>
    <filter id="turbulence" color-interpolation-filters="sRGB">
      <feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2"/>
    </filter>
  </defs>
</svg>