summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-grid/grid-repeat-auto-fill-fit-006.html
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /layout/reftests/css-grid/grid-repeat-auto-fill-fit-006.html
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/reftests/css-grid/grid-repeat-auto-fill-fit-006.html')
-rw-r--r--layout/reftests/css-grid/grid-repeat-auto-fill-fit-006.html213
1 files changed, 213 insertions, 0 deletions
diff --git a/layout/reftests/css-grid/grid-repeat-auto-fill-fit-006.html b/layout/reftests/css-grid/grid-repeat-auto-fill-fit-006.html
new file mode 100644
index 000000000..73a37e0a5
--- /dev/null
+++ b/layout/reftests/css-grid/grid-repeat-auto-fill-fit-006.html
@@ -0,0 +1,213 @@
+<!DOCTYPE HTML>
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html class="reftest-wait"><head>
+ <meta charset="utf-8">
+ <title>CSS Grid Test: repeat(auto-fit) with grid-aligned abs.pos.</title>
+ <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1118820">
+ <link rel="help" href="https://drafts.csswg.org/css-grid/#valdef-repeat-auto-fill">
+ <link rel="match" href="grid-repeat-auto-fill-fit-006-ref.html">
+ <style type="text/css">
+html,body {
+ color:black; background-color:white; font-size:16px; padding:0; margin:0;
+}
+
+.grid {
+ display: grid;
+ position: relative;
+ border: 1px solid;
+ grid-auto-rows: 30px;
+ grid-template-columns: [a] repeat(auto-fit, [b] 20px [c]) [d] 20px;
+ grid-gap: 2px;
+ width: 160px;
+ height: 30px;
+}
+
+.c1 { width: 160px; }
+.c2 { width: 150px; }
+.c3 { width: 140px; }
+.p1 { padding-left:5px; }
+
+.t2 { grid-template-columns: [a] repeat(auto-fit, [b] 20px [c]) [d]; }
+
+x {
+ width: 18px;
+ border:1px solid;
+ background: grey;
+}
+a {
+ position: absolute;
+ left:0; top:0; height:3px; right:0;
+ background: cyan;
+ grid-column: 7 / auto;
+}
+b {
+ position: absolute;
+ left:0; bottom:0; height:3px; right:0;
+ background: brown;
+ grid-column: auto / 7;
+}
+c {
+ position: absolute;
+ left:0; bottom:5px; height:3px; right:0;
+ background: pink;
+ grid-column: 6 / 7;
+}
+d {
+ position: absolute;
+ left:0; bottom:10px; height:3px; right:0;
+ background: silver;
+ grid-column: 3 / 6;
+}
+e {
+ position: absolute;
+ left:0; bottom:15px; height:3px; right:0;
+ background: magenta;
+ grid-column: 3 / 7;
+}
+f {
+ position: absolute;
+ left:0; bottom:20px; height:3px; right:0;
+ background: orange;
+ grid-column: auto / 6;
+}
+
+x:first-child {
+ background: lime;
+}
+x:last-child {
+ background: blue;
+}
+
+.t1 x:last-child {
+ grid-column-end:-1;
+}
+
+float { float:left; margin-right:20px; }
+
+</style>
+</head>
+<body>
+
+<float>
+<div class="grid c1 t1"><x></x><x></x><x></x><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+<div class="grid c2 t1"><x></x><x></x><x></x><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+<div class="grid c3 t1"><x></x><x></x><x></x><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+
+<div class="grid c1 t2"><x></x><x></x><x></x><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+<div class="grid c2 t2"><x></x><x></x><x></x><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+<div class="grid c3 t2"><x></x><x></x><x></x><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+
+<div class="grid c1 t1"><x></x><x></x><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+<div class="grid c2 t1"><x></x><x></x><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+<div class="grid c3 t1"><x></x><x></x><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+
+<div class="grid c1 t2"><x></x><x></x><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+<div class="grid c2 t2"><x></x><x></x><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+<div class="grid c3 t2"><x></x><x></x><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+
+<div class="grid c1 t1"><x></x><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+<div class="grid c2 t1"><x></x><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+<div class="grid c3 t1"><x></x><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+
+<div class="grid c1 t2"><x></x><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+<div class="grid c2 t2"><x></x><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+<div class="grid c3 t2"><x></x><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+</float>
+
+<float>
+<div class="grid c1 t1"><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+<div class="grid c2 t1"><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+<div class="grid c3 t1"><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+
+<div class="grid c1 t2"><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+<div class="grid c2 t2"><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+<div class="grid c3 t2"><x></x><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+
+<div class="grid c1 t1"><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+<div class="grid c2 t1"><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+<div class="grid c3 t1"><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+
+<div class="grid c1 t2"><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+<div class="grid c2 t2"><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+<div class="grid c3 t2"><a></a><b></b><c></c><d></d><e></e><f></f><x></x></div>
+
+<div class="grid c1 t1 p1"><a></a><b></b><c></c><d></d><e></e><f></f></div>
+<div class="grid c2 t1 p1"><a></a><b></b><c></c><d></d><e></e><f></f></div>
+<div class="grid c3 t1 p1"><a></a><b></b><c></c><d></d><e></e><f></f></div>
+
+<div class="grid c1 t2 p1"><a></a><b></b><c></c><d></d><e></e><f></f></div>
+<div class="grid c2 t2 p1"><a></a><b></b><c></c><d></d><e></e><f></f></div>
+<div class="grid c3 t2 p1"><a></a><b></b><c></c><d></d><e></e><f></f></div>
+</float>
+
+<script>
+function testGridTemplateColumns(elem, expected) {
+ var actual = window.getComputedStyle(elem).gridTemplateColumns;
+ if (actual != expected) {
+ var err = "FAIL: gridTemplateColumns " + elem.className +
+ ", GOT=" + actual +
+ ", EXPECTED=" + expected;
+ document.body.appendChild(document.createTextNode(err));
+ }
+}
+var a1 = [
+"[a b] 20px [c b] 20px [c b] 20px [c b] 20px [c b] 0px [c b] 0px [c d] 20px",
+"[a b] 20px [c b] 20px [c b] 20px [c b] 20px [c b] 0px [c d] 20px",
+"[a b] 20px [c b] 20px [c b] 20px [c b] 20px [c b] 0px [c d] 20px",
+"[a b] 20px [c b] 20px [c b] 20px [c b] 0px [c b] 0px [c b] 0px [c d] 20px",
+"[a b] 20px [c b] 20px [c b] 20px [c b] 0px [c b] 0px [c d] 20px",
+"[a b] 20px [c b] 20px [c b] 20px [c b] 0px [c b] 0px [c d] 20px",
+"[a b] 20px [c b] 20px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c d] 20px",
+"[a b] 20px [c b] 20px [c b] 0px [c b] 0px [c b] 0px [c d] 20px",
+"[a b] 20px [c b] 20px [c b] 0px [c b] 0px [c b] 0px [c d] 20px",
+"[a b] 20px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c d] 20px",
+"[a b] 20px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c d] 20px",
+"[a b] 20px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c d] 20px",
+"[a b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c d] 20px",
+"[a b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c d] 20px",
+"[a b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c d] 20px",
+"[a b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c d] 20px",
+"[a b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c d] 20px",
+"[a b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c d] 20px"
+];
+var a2 = [
+"[a b] 20px [c b] 20px [c b] 20px [c b] 20px [c b] 20px [c b] 0px [c b] 0px [c d]",
+"[a b] 20px [c b] 20px [c b] 20px [c b] 20px [c b] 20px [c b] 0px [c d]",
+"[a b] 20px [c b] 20px [c b] 20px [c b] 20px [c b] 20px [c b] 0px [c d]",
+"[a b] 20px [c b] 20px [c b] 20px [c b] 20px [c b] 0px [c b] 0px [c b] 0px [c d]",
+"[a b] 20px [c b] 20px [c b] 20px [c b] 20px [c b] 0px [c b] 0px [c d]",
+"[a b] 20px [c b] 20px [c b] 20px [c b] 20px [c b] 0px [c b] 0px [c d]",
+"[a b] 20px [c b] 20px [c b] 20px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c d]",
+"[a b] 20px [c b] 20px [c b] 20px [c b] 0px [c b] 0px [c b] 0px [c d]",
+"[a b] 20px [c b] 20px [c b] 20px [c b] 0px [c b] 0px [c b] 0px [c d]",
+"[a b] 20px [c b] 20px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c d]",
+"[a b] 20px [c b] 20px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c d]",
+"[a b] 20px [c b] 20px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c d]",
+"[a b] 20px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c d]",
+"[a b] 20px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c d]",
+"[a b] 20px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c d]",
+"[a b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c d]",
+"[a b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c d]",
+"[a b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c b] 0px [c d]"
+];
+function runTest() {
+ var t1 = document.querySelectorAll('.t1');
+ for (var i = 0; i < t1.length; ++i) {
+ testGridTemplateColumns(t1[i], a1[i]);
+ }
+ var t2 = document.querySelectorAll('.t2');
+ for (var i = 0; i < t2.length; ++i) {
+ testGridTemplateColumns(t2[i], a2[i]);
+ }
+
+ document.documentElement.className='';
+}
+document.addEventListener('MozReftestInvalidate', runTest, false);
+
+</script>
+
+</body>
+</html>