summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/filter-effects/filter-cb-abspos-inline-001.html
blob: 34d0373b3e394e46630e152b64789180021f3b6f (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
30
31
32
<!DOCTYPE html>
<meta charset=UTF-8>
<title>CSS Filter: Establishing containing block for absolutely-positioned elements, on an inline element</title>
<link rel="author" title="L. David Baron" href="https://dbaron.org/">
<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/">
<link rel="match" href="filter-cb-abspos-inline-001-ref.html">
<link rel="help" href="https://drafts.fxtf.org/filter-effects-1/#FilterProperty">
<link rel="help" href="https://drafts.fxtf.org/filter-effects-1/#supported-filter-functions">
<meta name="assert" content="A value other than none for the filter property results in the creation of a containing block for absolute and fixed positioned descendants unless the element it applies to is a document root element in the current browsing context.">
<meta name="assert" content="A value of 100% leaves the input unchanged.">
<style>

#cb {
    filter: brightness(100%);
}

#abspos {
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    background: blue;
}

</style>

<p>Filler text.</p>

<div>
    <span id="cb">Blue box should cover top-left corner of this sentence.<span id="abspos"></span></span>
</div>