Bug 1881020 [wpt PR 44674] - [anchor] Anchor queries on non-OOF must use fallback...
[gecko.git] / testing / web-platform / tests / css / css-anchor-position / sticky-anchor-position-invalid.html
blobd1efeed5f29263fe3a16d60cbdaf9d2c26357ce5
1 <!DOCTYPE html>
2 <title>Anchor queries in sticky positioning is invalid</title>
3 <link rel="author" href="mailto:xiaochengh@chromium.org">
4 <link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#valid-anchor-function">
5 <link rel="match" href="reference/sticky-anchor-position-invalid-ref.html">
6 <style>
7 #scroll-container {
8 width: 200px;
9 height: 200px;
10 overflow-y: scroll;
13 #scroller {
14 height: 400px;
17 #sticky {
18 position: sticky;
19 height: 150px;
20 background: green;
21 top: anchor(--invalid top, 42px); /* Should use the fallback */
23 </style>
24 <div id="scroll-container">
25 <div id="scroller">
26 <div id="sticky">
27 </div>
28 </div>
29 </div>
30 <script>
31 document.getElementById("scroll-container").scrollTop = 50;
32 </script>