mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update web-platform-tests to revision b'ee6da9d71d0268d7fdb04e8e5b26858f46ee0cc4'
This commit is contained in:
parent
4401622eb1
commit
b77ad115f6
16832 changed files with 270819 additions and 87621 deletions
|
@ -0,0 +1,21 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<style>
|
||||
#button {
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
margin: 100px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background-color: purple;
|
||||
vertical-align: top;
|
||||
}
|
||||
#button > div {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: green;
|
||||
}
|
||||
</style>
|
||||
<button id="button">
|
||||
<div></div>
|
||||
</button>
|
|
@ -0,0 +1,35 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Tests that after making a button a containing block, dynamically-inserted abspos boxes still get positioned correctly</title>
|
||||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1740439">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-position/#abspos-insets">
|
||||
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
|
||||
<link rel="author" href="https://mozilla.org" title="Mozilla">
|
||||
<link rel="match" href="containing-block-change-button-ref.html">
|
||||
<style>
|
||||
#button {
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
margin: 100px;
|
||||
background-color: purple;
|
||||
border: 0;
|
||||
padding: 10px;
|
||||
}
|
||||
#button > div {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: green;
|
||||
/* Vertically centered to match in-flow button layout of the reference */
|
||||
top: 150px;
|
||||
left: 0;
|
||||
}
|
||||
</style>
|
||||
<button id="button"></button>
|
||||
<script>
|
||||
let button = document.getElementById("button");
|
||||
button.getBoundingClientRect();
|
||||
button.style.position = "relative";
|
||||
button.getBoundingClientRect();
|
||||
button.appendChild(document.createElement("div"));
|
||||
</script>
|
|
@ -0,0 +1,32 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Test Reference</title>
|
||||
<style>
|
||||
#container {
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
margin: 100px;
|
||||
background-color: purple;
|
||||
position: relative;
|
||||
}
|
||||
#spacer {
|
||||
height: 300px;
|
||||
}
|
||||
#bottom {
|
||||
height: 100px;
|
||||
background-color: green;
|
||||
}
|
||||
#abspos {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: green;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
</style>
|
||||
<div id="container">
|
||||
<div id="spacer"></div>
|
||||
<div id="bottom"></div>
|
||||
<div id="abspos"></div>
|
||||
</div>
|
|
@ -0,0 +1,46 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Tests that after making a scrolling box a containing block, dynamically-inserted abspos boxes still get positioned correctly</title>
|
||||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1735533">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-position/#abspos-insets">
|
||||
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
|
||||
<link rel="author" href="https://mozilla.org" title="Mozilla">
|
||||
<link rel="match" href="containing-block-change-scrollframe-ref.html">
|
||||
<style>
|
||||
#container {
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
margin: 100px;
|
||||
background-color: purple;
|
||||
overflow: hidden;
|
||||
}
|
||||
#spacer {
|
||||
height: 700px;
|
||||
}
|
||||
#bottom {
|
||||
height: 100px;
|
||||
background-color: green;
|
||||
}
|
||||
#abspos {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: green;
|
||||
top: 400px;
|
||||
left: 0;
|
||||
}
|
||||
</style>
|
||||
<div id="container">
|
||||
<div id="spacer"></div>
|
||||
<div id="bottom"></div>
|
||||
</div>
|
||||
<script>
|
||||
let container = document.getElementById("container");
|
||||
container.scrollTop = 400;
|
||||
container.getBoundingClientRect();
|
||||
container.style.position = "relative";
|
||||
container.getBoundingClientRect();
|
||||
let abspos = document.createElement("div");
|
||||
abspos.id = "abspos";
|
||||
container.appendChild(abspos);
|
||||
</script>
|
|
@ -25,10 +25,6 @@ assert_not_inherited('top', 'auto', '10px');
|
|||
assert_not_inherited('right', 'auto', '10px');
|
||||
assert_not_inherited('bottom', 'auto', '10px');
|
||||
assert_not_inherited('left', 'auto', '10px');
|
||||
assert_not_inherited('inset-before', 'auto', '10px');
|
||||
assert_not_inherited('inset-after', 'auto', '10px');
|
||||
assert_not_inherited('inset-start', 'auto', '10px');
|
||||
assert_not_inherited('inset-end', 'auto', '10px');
|
||||
assert_not_inherited('z-index', 'auto', '123');
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://crbug.com/1236657">
|
||||
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
|
||||
<meta name="assert" content="A table should be centered with auto margins and zero insets.">
|
||||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
||||
<div style="position: relative; width: 200px; height: 100px; margin-left: -50px;">
|
||||
<div style="display: table; position: absolute; background: green; appearance: none; padding: 0; border: none; left: 0; right: 0; margin: auto; height: 100px;">
|
||||
<div style="width: 100px; height: 100px;"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://crbug.com/1236657">
|
||||
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
|
||||
<meta name="assert" content="A table should be centered with auto margins and zero insets.">
|
||||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
||||
<div style="position: relative; width: 100px; height: 200px; margin-top: -50px;">
|
||||
<div style="display: table; position: absolute; background: green; appearance: none; padding: 0; border: none; top: 0; bottom: 0; margin: auto; width: 100px;">
|
||||
<div style="width: 100px; height: 100px;"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
.cb {
|
||||
position: relative;
|
||||
border: 3px solid black;
|
||||
height: 100px;
|
||||
width: 150px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin: 5px;
|
||||
}
|
||||
.abs {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
top: 3px;
|
||||
left: 3px;
|
||||
outline: 2px solid lime;
|
||||
width: calc(100% - 6px);
|
||||
height: calc(100% - 6px);
|
||||
}
|
||||
</style>
|
||||
<div class="cb"><button class="abs">button</button></div>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/6789">
|
||||
<link rel="match" href="position-absolute-semi-replaced-stretch-button-ref.html">
|
||||
<title>Semi-replaced elements should stretch with an auto main size, and explicit insets in that direction.</title>
|
||||
<style>
|
||||
.cb {
|
||||
position: relative;
|
||||
border: 3px solid black;
|
||||
height: 100px;
|
||||
width: 150px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin: 5px;
|
||||
}
|
||||
.abs {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
top: 3px;
|
||||
right: 3px;
|
||||
bottom: 3px;
|
||||
left: 3px;
|
||||
outline: 2px solid lime;
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
<div class="cb"><button class="abs">button</button></div>
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
.cb {
|
||||
position: relative;
|
||||
border: 3px solid black;
|
||||
height: 100px;
|
||||
width: 150px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin: 5px;
|
||||
}
|
||||
.wide {
|
||||
width: 350px;
|
||||
}
|
||||
.abs {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
top: 3px;
|
||||
left: 3px;
|
||||
outline: 2px solid lime;
|
||||
width: calc(100% - 6px);
|
||||
height: calc(100% - 6px);
|
||||
}
|
||||
</style>
|
||||
<div class="cb"><input type="button" class="abs" value="input-btn"></div>
|
||||
<div class="cb"><input type="submit" class="abs"></div>
|
||||
<div class="cb"><input type="reset" class="abs"></div>
|
||||
<div class="cb"><input type="color" class="abs"></div>
|
||||
<div class="cb wide"><input type="text" class="abs" value="text"></div>
|
||||
<div class="cb wide"><input type="password" class="abs" value="pass"></div>
|
||||
<div class="cb wide"><input type="date" class="abs" value="text"></div>
|
||||
<div class="cb wide"><input type="file" class="abs"></div>
|
||||
<div class="cb wide"><input type="range" class="abs"></div>
|
|
@ -0,0 +1,42 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/6789">
|
||||
<link rel="match" href="position-absolute-semi-replaced-stretch-input-ref.html">
|
||||
<title>Semi-replaced elements should stretch with an auto main size, and explicit insets in that direction.</title>
|
||||
<style>
|
||||
.cb {
|
||||
position: relative;
|
||||
border: 3px solid black;
|
||||
height: 100px;
|
||||
width: 150px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin: 5px;
|
||||
}
|
||||
.wide {
|
||||
/* Some of the form controls are wider than others
|
||||
and need a wider CB in order to see if they're
|
||||
stretching or shrinking. */
|
||||
width: 350px;
|
||||
}
|
||||
.abs {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
top: 3px;
|
||||
right: 3px;
|
||||
bottom: 3px;
|
||||
left: 3px;
|
||||
outline: 2px solid lime;
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
<div class="cb"><input type="button" class="abs" value="input-btn"></div>
|
||||
<div class="cb"><input type="submit" class="abs"></div>
|
||||
<div class="cb"><input type="reset" class="abs"></div>
|
||||
<div class="cb"><input type="color" class="abs"></div>
|
||||
<div class="cb wide"><input type="text" class="abs" value="text"></div>
|
||||
<div class="cb wide"><input type="password" class="abs" value="pass"></div>
|
||||
<div class="cb wide"><input type="date" class="abs" value="text"></div>
|
||||
<div class="cb wide"><input type="file" class="abs"></div>
|
||||
<div class="cb wide"><input type="range" class="abs"></div>
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
.cb {
|
||||
position: relative;
|
||||
border: 3px solid black;
|
||||
height: 100px;
|
||||
width: 150px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin: 5px;
|
||||
}
|
||||
.wide {
|
||||
width: 350px;
|
||||
}
|
||||
.abs {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
top: 3px;
|
||||
left: 3px;
|
||||
outline: 2px solid lime;
|
||||
width: calc(100% - 6px);
|
||||
height: calc(100% - 6px);
|
||||
}
|
||||
</style>
|
||||
<div class="cb"><select class="abs"><option>select</option></select></div>
|
||||
<div class="cb"><output class="abs">output</output></div>
|
||||
<div class="cb"><label class="abs">label</output></div>
|
||||
<div class="cb"><fieldset class="abs">fieldset</fieldset></div>
|
||||
<div class="cb wide"><textarea class="abs">textarea</textarea></div>
|
||||
<div class="cb wide"><progress value="0.4" class="abs"></div>
|
||||
<div class="cb wide"><meter value="0.4" class="abs"></div>
|
|
@ -0,0 +1,40 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/6789">
|
||||
<link rel="match" href="position-absolute-semi-replaced-stretch-other-ref.html">
|
||||
<title>Semi-replaced elements should stretch with an auto main size, and explicit insets in that direction.</title>
|
||||
<style>
|
||||
.cb {
|
||||
position: relative;
|
||||
border: 3px solid black;
|
||||
height: 100px;
|
||||
width: 150px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin: 5px;
|
||||
}
|
||||
.wide {
|
||||
/* Some of the form controls are wider than others
|
||||
and need a wider CB in order to see if they're
|
||||
stretching or shrinking. */
|
||||
width: 350px;
|
||||
}
|
||||
.abs {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
top: 3px;
|
||||
right: 3px;
|
||||
bottom: 3px;
|
||||
left: 3px;
|
||||
outline: 2px solid lime;
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
<div class="cb"><select class="abs"><option>select</option></select></div>
|
||||
<div class="cb"><output class="abs">output</output></div>
|
||||
<div class="cb"><label class="abs">label</output></div>
|
||||
<div class="cb"><fieldset class="abs">fieldset</fieldset></div>
|
||||
<div class="cb wide"><textarea class="abs">textarea</textarea></div>
|
||||
<div class="cb wide"><progress value="0.4" class="abs"></div>
|
||||
<div class="cb wide"><meter value="0.4" class="abs"></div>
|
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<div id="scroller" style="width: 200px; height: 200px; overflow: auto">
|
||||
<div style="height: 0; opacity: 0.5; margin: 250px">
|
||||
<div style="width: 100px; height: 100px; background: green"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
scroller.scrollTo(200, 200);
|
||||
</script>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<link rel="help" href="https://crbug.com/1273431">
|
||||
<link rel="match" href="position-absolute-under-non-containing-stacking-context-ref.html">
|
||||
<script src="/common/rendering-utils.js"></script>
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<div id="scroller" style="width:200px; height: 200px; overflow: auto; position: relative">
|
||||
<div style="height: 0; overflow: hidden; opacity: 0.5; margin: 250px">
|
||||
<div style="width: 100px; height: 100px; position: absolute; background: green"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
waitForAtLeastOneFrame().then(() => {
|
||||
scroller.scrollTo(200, 200);
|
||||
takeScreenshot();
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,9 @@
|
|||
<!doctype HTML>
|
||||
<title>CSS Test Reference</title>
|
||||
<div style="position: relative; background: red; width: 100px; height: 100px; overflow: hidden;">
|
||||
<div style="overflow-y: scroll; width: 400px; height: 400px;">
|
||||
<div style="height: 100px; width: 100px; background: green;"></div>
|
||||
<!-- forces scrolling -->
|
||||
<div style="height: 700px;"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,25 @@
|
|||
<!doctype HTML>
|
||||
<html class="reftest-wait">
|
||||
<title>CSS Test: Test for re-paint after position change</title>
|
||||
<link rel="author" title="Philip Rogers" href="mailto:pdr@chromium.org" />
|
||||
<link rel="help" href="https://www.w3.org/TR/CSS2/zindex.html">
|
||||
<link rel="match" href="position-change-ref.html">
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
|
||||
<div style="position: relative; background: red; width: 100px; height: 100px; overflow: hidden;">
|
||||
<div id="target" style="overflow-y: scroll; width: 400px; height: 400px; position: relative;">
|
||||
<div style="height: 100px; width: 100px; background: green;"></div>
|
||||
<!-- forces scrolling -->
|
||||
<div style="height: 700px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
onload = function() {
|
||||
requestAnimationFrame(() => requestAnimationFrame(() => {
|
||||
target.style.position = "";
|
||||
takeScreenshot();
|
||||
}));
|
||||
}
|
||||
</script>
|
||||
</html
|
|
@ -0,0 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<div style="width: 100px; height: 8000px; background: green"></div>
|
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-position/#fixed-pos">
|
||||
<link rel="help" href="https://crbug.com/1274414">
|
||||
<link rel="match" href="position-fixed-scroll-overlap-ref.html">
|
||||
<meta name="assert" content="The red fixed-position element should be always invisible
|
||||
(covered by the green elements), regardless of viewport scroll offset">
|
||||
<script src="/common/rendering-utils.js"></script>
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<style>
|
||||
.section {
|
||||
width: 100px;
|
||||
height: 2000px;
|
||||
background: green;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
</style>
|
||||
<svg style="width: 100px; height: 1000px; position: fixed">
|
||||
<rect width="200" height="2000" fill="red"/>
|
||||
</svg>
|
||||
<div class="section"></div>
|
||||
<div class="section"></div>
|
||||
<div class="section"></div>
|
||||
<div class="section"></div>
|
||||
<script>
|
||||
waitForAtLeastOneFrame().then(() => {
|
||||
window.scrollTo(0, 4000);
|
||||
waitForAtLeastOneFrame().then(() => {
|
||||
window.scrollTo(0, 0);
|
||||
takeScreenshot();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
|
@ -25,7 +25,10 @@ function setupStickyTest(stickyDirection, stickyOffset) {
|
|||
elements.scroller.style.position = 'relative';
|
||||
elements.scroller.style.width = (inline ? '200px' : '100px');
|
||||
elements.scroller.style.height = (inline ? '100px' : '200px');
|
||||
elements.scroller.style.overflow = 'scroll';
|
||||
|
||||
// 'hidden' is used here instead of 'scroll' because this prevents
|
||||
// scrollbars from affecting the size and offset of sticky items.
|
||||
elements.scroller.style.overflow = 'hidden';
|
||||
|
||||
elements.contents = document.createElement('div');
|
||||
elements.contents.style.height = (inline ? '100%' : '500px');
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE html>
|
||||
<title>position:sticky should work for elements with display: table* containing blocks</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos" />
|
||||
<meta name="assert" content="This test checks that position:sticky works for elements with containing blocks that have display: table*" />
|
||||
|
||||
<style>
|
||||
.group {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.container {
|
||||
height: 1000px;
|
||||
width: 50px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.scroll-container {
|
||||
height: 300px;
|
||||
width: 500px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sticky {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="scroll-container">
|
||||
<div class="group">
|
||||
<div class="container" style="display: table-cell;">
|
||||
<div class="sticky"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div class="container" style="display: table-row;">
|
||||
<div class="sticky"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div class="container" style="display: table;">
|
||||
<div class="sticky"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,71 @@
|
|||
<!DOCTYPE html>
|
||||
<title>position:sticky should work for elements with display: table* containing blocks</title>
|
||||
<link rel="match" href="position-sticky-contained-by-display-table-ref.html" />
|
||||
<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos" />
|
||||
<meta name="assert" content="This test checks that position:sticky works for elements with containing blocks that have display: table*" />
|
||||
|
||||
<style>
|
||||
.group {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.container {
|
||||
height: 1000px;
|
||||
width: 50px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#scroll-container {
|
||||
height: 300px;
|
||||
width: 500px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sticky {
|
||||
position: sticky;
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
background: green;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
#scroll-indicator {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
width: 300px;
|
||||
height: 50px;
|
||||
background: red;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
window.addEventListener('load', function() {
|
||||
document.getElementById('scroll-container').scrollTop = 300;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<div id="scroll-container">
|
||||
<div class="group">
|
||||
<div class="container" style="display: table-cell;">
|
||||
<div class="sticky"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div class="container" style="display: table-row;">
|
||||
<div class="sticky"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div class="container" style="display: table;">
|
||||
<div class="sticky"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- This is here to validate that the container does scroll. -->
|
||||
<div id="scroll-indicator" style=""></div>
|
||||
</div>
|
|
@ -12,7 +12,7 @@
|
|||
overflow: auto;
|
||||
height: 200px;
|
||||
width: 200px;
|
||||
transform: scale(1);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.block {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
overflow: auto;
|
||||
height: 200px;
|
||||
width: 200px;
|
||||
transform: scale(1);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.block {
|
||||
|
|
|
@ -30,7 +30,7 @@ test(() => {
|
|||
const nonStickyTopY = elements.container.offsetTop +
|
||||
elements.filler.clientHeight;
|
||||
assert_equals(elements.sticky.offsetTop, nonStickyTopY);
|
||||
assert_equals(elements.innerSticky.offsetTop, 35);
|
||||
assert_equals(elements.innerSticky.offsetTop, 50);
|
||||
}, 'the inner sticky can stick before the outer one if necessary');
|
||||
|
||||
test(() => {
|
||||
|
@ -52,14 +52,14 @@ test(() => {
|
|||
}, 'both sticky boxes can be stuck at the same time');
|
||||
|
||||
test(() => {
|
||||
const elements = setupNestedStickyTest('bottom', 25, 35);
|
||||
const elements = setupNestedStickyTest('bottom', 25, 75);
|
||||
elements.scroller.scrollTop = 0;
|
||||
assert_equals(elements.sticky.offsetTop, elements.container.offsetTop);
|
||||
assert_equals(elements.innerSticky.offsetTop, 0);
|
||||
}, 'neither sticky can escape their containing block');
|
||||
|
||||
test(() => {
|
||||
const elements = setupNestedStickyTest('bottom', 25, 500);
|
||||
const elements = setupNestedStickyTest('bottom', 25, 300);
|
||||
elements.scroller.scrollTop = 200;
|
||||
// It doesn't matter how big the inner sticky offset is, it cannot escape its
|
||||
// containing block (the outer sticky).
|
||||
|
|
|
@ -30,7 +30,7 @@ test(() => {
|
|||
const nonStickyLeftX = elements.container.offsetLeft +
|
||||
elements.filler.clientWidth;
|
||||
assert_equals(elements.sticky.offsetLeft, nonStickyLeftX);
|
||||
assert_equals(elements.innerSticky.offsetLeft, 35);
|
||||
assert_equals(elements.innerSticky.offsetLeft, 50);
|
||||
}, 'the inner sticky can stick before the outer one if necessary');
|
||||
|
||||
test(() => {
|
||||
|
@ -52,7 +52,7 @@ test(() => {
|
|||
}, 'both sticky boxes can be stuck at the same time');
|
||||
|
||||
test(() => {
|
||||
const elements = setupNestedStickyTest('right', 25, 35);
|
||||
const elements = setupNestedStickyTest('right', 25, 100);
|
||||
elements.scroller.scrollLeft = 0;
|
||||
assert_equals(elements.sticky.offsetLeft, elements.container.offsetLeft);
|
||||
assert_equals(elements.innerSticky.offsetLeft, 0);
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Reference for position:sticky bottom constraint should behave correctly for <td> elements</title>
|
||||
|
||||
<style>
|
||||
.group {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 150px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.scroller {
|
||||
position: relative;
|
||||
width: 100px;
|
||||
height: 150px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.contents {
|
||||
height: 550px;
|
||||
}
|
||||
|
||||
.indicator {
|
||||
position: absolute;
|
||||
background-color: green;
|
||||
left: 0;
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
window.addEventListener('load', function() {
|
||||
document.getElementById('scroller1').scrollTop = 0;
|
||||
document.getElementById('scroller2').scrollTop = 75;
|
||||
document.getElementById('scroller3').scrollTop = 150;
|
||||
});
|
||||
</script>
|
||||
|
||||
<div>You should see three green boxes below. No red should be visible.</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller1" class="scroller">
|
||||
<div class="indicator" style="top: 100px;"></div>
|
||||
<div class="contents"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller2" class="scroller">
|
||||
<div class="indicator" style="top: 150px;"></div>
|
||||
<div class="contents"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller3" class="scroller">
|
||||
<div class="indicator" style="top: 200px;"></div>
|
||||
<div class="contents"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,109 @@
|
|||
<!DOCTYPE html>
|
||||
<title>position:sticky bottom constraint should behave correctly for <td> elements</title>
|
||||
<link rel="match" href="position-sticky-table-td-bottom-ref.html" />
|
||||
<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos" />
|
||||
<meta name="assert" content="This test checks that the position:sticky bottom constraint behaves correctly for <td> elements" />
|
||||
|
||||
<style>
|
||||
table {
|
||||
border-collapse:collapse;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
td > div {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.group {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 150px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.scroller {
|
||||
position: relative;
|
||||
width: 100px;
|
||||
height: 150px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.prepadding {
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.postpadding {
|
||||
height: 250px;
|
||||
}
|
||||
|
||||
.indicator {
|
||||
position: absolute;
|
||||
background-color: red;
|
||||
left: 0;
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.sticky {
|
||||
position: sticky;
|
||||
bottom: 25px;
|
||||
background-color: green;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
window.addEventListener('load', function() {
|
||||
document.getElementById('scroller1').scrollTop = 0;
|
||||
document.getElementById('scroller2').scrollTop = 75;
|
||||
document.getElementById('scroller3').scrollTop = 150;
|
||||
});
|
||||
</script>
|
||||
|
||||
<div>You should see three green boxes below. No red should be visible.</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller1" class="scroller">
|
||||
<div class="indicator" style="top: 100px;"></div>
|
||||
<div class="prepadding"></div>
|
||||
<table>
|
||||
<tr><td><div></div></td></tr>
|
||||
<tr><td><div></div></td></tr>
|
||||
<tr><td class="sticky"><div></div></td></td>
|
||||
<tr><td><div></div></td></tr>
|
||||
</table>
|
||||
<div class="postpadding"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller2" class="scroller">
|
||||
<div class="indicator" style="top: 150px;"></div>
|
||||
<div class="prepadding"></div>
|
||||
<table>
|
||||
<tr><td><div></div></td></tr>
|
||||
<tr><td><div></div></td></tr>
|
||||
<tr><td class="sticky"><div></div></td></td>
|
||||
<tr><td><div></div></td></tr>
|
||||
</table>
|
||||
<div class="postpadding"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller3" class="scroller">
|
||||
<div class="indicator" style="top: 200px;"></div>
|
||||
<div class="prepadding"></div>
|
||||
<table>
|
||||
<tr><td><div></div></td></tr>
|
||||
<tr><td><div></div></td></tr>
|
||||
<tr><td class="sticky"><div></div></td></td>
|
||||
<tr><td><div></div></td></tr>
|
||||
</table>
|
||||
<div class="postpadding"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Reference for position:sticky left constraint should behave correctly for <td> elements</title>
|
||||
|
||||
<style>
|
||||
.group {
|
||||
position: relative;
|
||||
width: 250px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.scroller {
|
||||
position: relative;
|
||||
width: 200px;
|
||||
height: 100px;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.contents {
|
||||
height: 10px;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
.indicator {
|
||||
position: absolute;
|
||||
background-color: green;
|
||||
top: 0;
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
window.addEventListener('load', function() {
|
||||
document.getElementById('scroller1').scrollLeft = 50;
|
||||
document.getElementById('scroller2').scrollLeft = 175;
|
||||
document.getElementById('scroller3').scrollLeft = 250;
|
||||
});
|
||||
</script>
|
||||
|
||||
<div>You should see three green boxes below. No red or blue should be visible.</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller1" class="scroller">
|
||||
<div class="indicator" style="left: 150px;"></div>
|
||||
<div class="contents"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller2" class="scroller">
|
||||
<div class="indicator" style="left: 200px;"></div>
|
||||
<div class="contents"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller3" class="scroller">
|
||||
<div class="indicator" style="left: 250px;"></div>
|
||||
<div class="contents"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,118 @@
|
|||
<!DOCTYPE html>
|
||||
<title>position:sticky left constraint should behave correctly for <td> elements</title>
|
||||
<link rel="match" href="position-sticky-table-td-left-ref.html" />
|
||||
<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos" />
|
||||
<meta name="assert" content="This test checks that the position:sticky left constraint behaves correctly for <td> elements" />
|
||||
|
||||
<script src="../resources/ref-rectangle.js"></script>
|
||||
|
||||
<style>
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
margin-left: 100px;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
td > div {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.group {
|
||||
position: relative;
|
||||
width: 250px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.scroller {
|
||||
position: relative;
|
||||
width: 200px;
|
||||
height: 100px;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.postpadding {
|
||||
height: 10px;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
.indicator {
|
||||
position: absolute;
|
||||
background-color: red;
|
||||
top: 0;
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.sticky {
|
||||
position: sticky;
|
||||
left: 25px;
|
||||
background-color: green;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
window.addEventListener('load', function() {
|
||||
document.getElementById('scroller1').scrollLeft = 50;
|
||||
document.getElementById('scroller2').scrollLeft = 175;
|
||||
document.getElementById('scroller3').scrollLeft = 250;
|
||||
createIndicatorForStickyElements(document.querySelectorAll('.sticky'));
|
||||
});
|
||||
</script>
|
||||
|
||||
<div>You should see three green boxes below. No red or blue should be visible.</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller1" class="scroller">
|
||||
<div class="indicator" style="left: 150px;"></div>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><div></div></td>
|
||||
<td class="sticky"><div></div></td>
|
||||
<td><div></div></td>
|
||||
<td><div></div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="postpadding"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller2" class="scroller">
|
||||
<div class="indicator" style="left: 200px;"></div>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><div></div></td>
|
||||
<td class="sticky"><div></div></td>
|
||||
<td><div></div></td>
|
||||
<td><div></div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="postpadding"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller3" class="scroller">
|
||||
<div class="indicator" style="left: 250px;"></div>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><div></div></td>
|
||||
<td class="sticky"><div></div></td>
|
||||
<td><div></div></td>
|
||||
<td><div></div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="postpadding"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Reference for position:sticky right constraint should behave correctly for <td> elements</title>
|
||||
|
||||
<style>
|
||||
.group {
|
||||
position: relative;
|
||||
width: 250px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.scroller {
|
||||
position: relative;
|
||||
width: 200px;
|
||||
height: 100px;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.contents {
|
||||
height: 10px;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
.indicator {
|
||||
position: absolute;
|
||||
background-color: green;
|
||||
top: 0;
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
window.addEventListener('load', function() {
|
||||
document.getElementById('scroller1').scrollLeft = 0;
|
||||
document.getElementById('scroller2').scrollLeft = 75;
|
||||
document.getElementById('scroller3').scrollLeft = 150;
|
||||
});
|
||||
</script>
|
||||
|
||||
<div>You should see three green boxes below. No red or blue should be visible.</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller1" class="scroller">
|
||||
<div class="indicator" style="left: 150px;"></div>
|
||||
<div class="contents"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller2" class="scroller">
|
||||
<div class="indicator" style="left: 200px;"></div>
|
||||
<div class="contents"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller3" class="scroller">
|
||||
<div class="indicator" style="left: 250px;"></div>
|
||||
<div class="contents"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,118 @@
|
|||
<!DOCTYPE html>
|
||||
<title>position:sticky right constraint should behave correctly for <td> elements</title>
|
||||
<link rel="match" href="position-sticky-table-td-right-ref.html" />
|
||||
<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos" />
|
||||
<meta name="assert" content="This test checks that the position:sticky right constraint behaves correctly for <td> elements" />
|
||||
|
||||
<script src="../resources/ref-rectangle.js"></script>
|
||||
|
||||
<style>
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
margin-left: 150px;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
td > div {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.group {
|
||||
position: relative;
|
||||
width: 250px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.scroller {
|
||||
position: relative;
|
||||
width: 200px;
|
||||
height: 100px;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.postpadding {
|
||||
height: 10px;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
.indicator {
|
||||
position: absolute;
|
||||
background-color: red;
|
||||
top: 0;
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.sticky {
|
||||
position: sticky;
|
||||
right: 25px;
|
||||
background-color: green;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
window.addEventListener('load', function() {
|
||||
document.getElementById('scroller1').scrollLeft = 0;
|
||||
document.getElementById('scroller2').scrollLeft = 75;
|
||||
document.getElementById('scroller3').scrollLeft = 150;
|
||||
createIndicatorForStickyElements(document.querySelectorAll('.sticky'));
|
||||
});
|
||||
</script>
|
||||
|
||||
<div>You should see three green boxes below. No red or blue should be visible.</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller1" class="scroller">
|
||||
<div class="indicator" style="left: 150px;"></div>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><div></div></td>
|
||||
<td><div></div></td>
|
||||
<td class="sticky"><div></div></td>
|
||||
<td><div></div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="postpadding"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller2" class="scroller">
|
||||
<div class="indicator" style="left: 200px;"></div>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><div></div></td>
|
||||
<td><div></div></td>
|
||||
<td class="sticky"><div></div></td>
|
||||
<td><div></div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="postpadding"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller3" class="scroller">
|
||||
<div class="indicator" style="left: 250px;"></div>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><div></div></td>
|
||||
<td><div></div></td>
|
||||
<td class="sticky"><div></div></td>
|
||||
<td><div></div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="postpadding"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Reference for position:sticky top constraint should behave correctly for <td> elements</title>
|
||||
|
||||
<style>
|
||||
.group {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 150px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.scroller {
|
||||
position: relative;
|
||||
width: 100px;
|
||||
height: 150px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.contents {
|
||||
height: 550px;
|
||||
}
|
||||
|
||||
.indicator {
|
||||
position: absolute;
|
||||
background-color: green;
|
||||
left: 0;
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
window.addEventListener('load', function() {
|
||||
document.getElementById('scroller1').scrollTop = 150;
|
||||
document.getElementById('scroller2').scrollTop = 225;
|
||||
document.getElementById('scroller3').scrollTop = 250;
|
||||
});
|
||||
</script>
|
||||
|
||||
<div>You should see three green boxes below. No red should be visible.</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller1" class="scroller">
|
||||
<div class="indicator" style="top: 200px;"></div>
|
||||
<div class="contents"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller2" class="scroller">
|
||||
<div class="indicator" style="top: 250px;"></div>
|
||||
<div class="contents"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller3" class="scroller">
|
||||
<div class="indicator" style="top: 250px;"></div>
|
||||
<div class="contents"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,109 @@
|
|||
<!DOCTYPE html>
|
||||
<title>position:sticky top constraint should behave correctly for <td> elements</title>
|
||||
<link rel="match" href="position-sticky-table-td-top-ref.html" />
|
||||
<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos" />
|
||||
<meta name="assert" content="This test checks that the position:sticky top constraint behaves correctly for <td> elements" />
|
||||
|
||||
<style>
|
||||
table {
|
||||
border-collapse:collapse;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
td > div {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.group {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 150px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.scroller {
|
||||
position: relative;
|
||||
width: 100px;
|
||||
height: 150px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.prepadding {
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.postpadding {
|
||||
height: 250px;
|
||||
}
|
||||
|
||||
.indicator {
|
||||
position: absolute;
|
||||
background-color: red;
|
||||
left: 0;
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.sticky {
|
||||
position: sticky;
|
||||
top: 25px;
|
||||
background-color: green;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
window.addEventListener('load', function() {
|
||||
document.getElementById('scroller1').scrollTop = 150;
|
||||
document.getElementById('scroller2').scrollTop = 225;
|
||||
document.getElementById('scroller3').scrollTop = 250;
|
||||
});
|
||||
</script>
|
||||
|
||||
<div>You should see three green boxes below. No red should be visible.</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller1" class="scroller">
|
||||
<div class="indicator" style="top: 200px;"></div>
|
||||
<div class="prepadding"></div>
|
||||
<table>
|
||||
<tr><td><div></div></td></tr>
|
||||
<tr><td><div></div></td></tr>
|
||||
<tr><td class="sticky"><div></div></td></tr>
|
||||
<tr><td><div></div></td></tr>
|
||||
</table>
|
||||
<div class="postpadding"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller2" class="scroller">
|
||||
<div class="indicator" style="top: 250px;"></div>
|
||||
<div class="prepadding"></div>
|
||||
<table>
|
||||
<tr><td><div></div></td></tr>
|
||||
<tr><td><div></div></td></tr>
|
||||
<tr><td class="sticky"><div></div></td></tr>
|
||||
<tr><td><div></div></td></tr>
|
||||
</table>
|
||||
<div class="postpadding"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<div id="scroller3" class="scroller">
|
||||
<div class="indicator" style="top: 250px;"></div>
|
||||
<div class="prepadding"></div>
|
||||
<table>
|
||||
<tr><td><div></div></td></tr>
|
||||
<tr><td><div></div></td></tr>
|
||||
<tr><td class="sticky"><div></div></td></tr>
|
||||
<tr><td><div></div></td></tr>
|
||||
</table>
|
||||
<div class="postpadding"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -14,7 +14,7 @@
|
|||
position: relative;
|
||||
width: 130px;
|
||||
height: 200px;
|
||||
overflow: scroll;
|
||||
overflow: hidden;
|
||||
font: 25px/1 Ahem;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
position: relative;
|
||||
width: 130px;
|
||||
height: 200px;
|
||||
overflow: scroll;
|
||||
overflow: hidden;
|
||||
font: 25px/1 Ahem;
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ window.addEventListener('load', function() {
|
|||
|
||||
<div class="group">
|
||||
<div id="scroller2" class="scroller" style="writing-mode: vertical-rl;">
|
||||
<div class="indicator" style="left: 45px; top: 100px;">XXX</div>
|
||||
<div class="indicator" style="left: 60px; top: 100px;">XXX</div>
|
||||
<div class="contents">
|
||||
<div class="sticky" style="right: 20px;">XXX</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue