Update web-platform-tests to revision 10adbd6b133f1ccf77a27ed51ffd3e7a00a499ee

This commit is contained in:
WPT Sync Bot 2020-03-24 08:19:05 +00:00
parent ecef8994e0
commit 1d6ba62c8f
119 changed files with 4676 additions and 523 deletions

View file

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html>
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="help" href="https://drafts.csswg.org/css-grid/#typedef-auto-repeat">
<head>
<style>
.grid-container {
height: 30px;
width: 300px;
border-bottom: 2px solid #cfbfcf;
}
.grid-container > * { float: left; height: 30px; }
.grid-container > :nth-child(2n) { background: sienna; }
.grid-container > :nth-child(2n + 1) { background: orange; }
</style>
</head>
<body>
<p>The test passes if it has the same visual effect as reference.</p>
<div class="grid-container">
<div style="width: 10px;"></div>
<div style="width: 20px;"></div>
<div style="width: 30px;"></div>
<div style="width: 40px;"></div>
<div style="width: 30px;"></div>
<div style="width: 40px;"></div>
</div>
<div class="grid-container">
<div style="width: 10px;"></div>
<div style="width: 20px;"></div>
<div style="width: 30px;"></div>
<div style="width: 40px;"></div>
<div style="width: 30px;"></div>
<div style="width: 50px; margin-left: 40px;"></div>
</div>
<div class="grid-container">
<div style="width: 20px; margin-left: 10px"></div>
<div style="width: 30px;"></div>
<div style="width: 30px; margin-left: 40px;"></div>
<div style="width: 40px;"></div>
<div style="width: 50px;"></div>
<div style="width: 60px;"></div>
</div>
</body>
</html>

View file

@ -0,0 +1,62 @@
<!DOCTYPE html>
<html>
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="help" href="https://drafts.csswg.org/css-grid/#typedef-auto-repeat">
<link rel="match" href="grid-auto-repeat-multiple-values-002-ref.html">
<head>
<style>
.holder {
height: 30px;
width: 300px;
border-bottom: 2px solid #cfbfcf;
}
.grid-container {
display: grid;
grid-template-columns: 10px 20px repeat(auto-fill, 30px 40px) 50px 60px;
grid-template-rows: repeat(auto-fill, minmax(30px, auto));
}
.grid-container > :nth-child(2n) { background: sienna; }
.grid-container > :nth-child(2n+1) { background: orange; }
</style>
</head>
<body>
<p>The test passes if it has the same visual effect as reference.</p>
<div class="holder">
<div class="grid-container">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div style="grid-column: 7;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="grid-column: 2;"></div>
<div></div>
<div style="grid-column: 5;"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,104 @@
<!DOCTYPE html>
<html>
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="help" href="https://drafts.csswg.org/css-grid/#typedef-auto-repeat">
<head>
<style>
.grid-container {
height: 30px;
width: 300px;
border-bottom: 2px solid #cfbfcf;
}
.grid-container > * { float: left; height: 30px; }
.grid-container > :nth-child(2n) { background: sienna; }
.grid-container > :nth-child(2n + 1) { background: orange; }
.auto-fit-long {
width: 650px;
}
.auto-fit-long > :nth-child(2n) { width: 30px; }
.auto-fit-long > :nth-child(2n+1) { width: 40px; }
.auto-medium-fit {
width: 510px;
}
</style>
</head>
<body>
<p>The test passes if it has the same visual effect as reference.</p>
<div class="grid-container">
<div style="width: 10px;"></div>
<div style="width: 20px;"></div>
<div style="width: 30px;"></div>
<div style="width: 40px;"></div>
<div style="width: 30px;"></div>
<div style="width: 40px;"></div>
</div>
<div class="grid-container">
<div style="width: 10px;"></div>
<div style="width: 20px;"></div>
<div style="width: 30px;"></div>
<div style="width: 40px;"></div>
<div style="width: 30px;"></div>
<div style="width: 50px;"></div>
</div>
<div class="grid-container auto-fit-long">
<div style="width: 20px; margin-left: 10px"></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<div class="grid-container auto-fit-long">
<div style="width: 20px; margin-left: 10px"></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<div class="grid-container auto-fit-long">
<div style="width: 20px; margin-left: 10px"></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<div class="grid-container">
<div style="width: 20px; margin-left: 10px"></div>
<div style="width: 30px;"></div>
<div style="width: 30px;"></div>
<div style="width: 40px;"></div>
<div style="width: 50px;"></div>
<div style="width: 60px;"></div>
</div>
<div class="grid-container">
<div style="width: 10px;"></div>
<div style="width: 20px;"></div>
<div style="width: 30px;"></div>
<div style="width: 40px;"></div>
<div style="width: 50px;"></div>
<div style="width: 60px;"></div>
</div>
<div class="grid-container">
<div style="width: 40px; margin-left: 30px"></div>
<div style="width: 30px;"></div>
<div style="width: 40px;"></div>
<div style="width: 50px;"></div>
<div style="width: 60px;"></div>
</div>
<div class="grid-container auto-medium-fit">
<div style="width: 10px;"></div>
<div style="width: 110px; margin-left: 20px"></div>
<div style="width: 30px;"></div>
</div>
</body>
</html>

View file

@ -0,0 +1,127 @@
<!DOCTYPE html>
<html>
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="help" href="https://drafts.csswg.org/css-grid/#typedef-auto-repeat">
<link rel="match" href="grid-auto-repeat-multiple-values-003-ref.html">
<head>
<style>
.holder {
height: 30px;
width: 300px;
border-bottom: 2px solid #cfbfcf;
}
.wide-holder {
height: 30px;
width: 650px;
border-bottom: 2px solid #cfbfcf;
}
.grid-container {
display: grid;
grid-template-columns: 10px 20px repeat(auto-fit, 30px 40px) 50px 60px;
grid-template-rows: repeat(auto-fill, minmax(30px, auto));
}
.grid-container > :nth-child(2n) { background: sienna; }
.grid-container > :nth-child(2n+1) { background: orange; }
</style>
</head>
<body>
<p>The test passes if it has the same visual effect as reference.</p>
<div class="holder">
<div class="grid-container">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div style="grid-column: 7;"></div>
</div>
</div>
<!-- Test correct tracking of collapsed tracks -->
<div class="holder" style="width: 650px">
<div class="grid-container">
<div style="grid-column: 2;"></div>
<div></div>
<div style="grid-column: 6;"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder" style="width: 650px">
<div class="grid-container">
<div style="grid-column: 2;"></div>
<div></div>
<div style="grid-column: 10;"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder" style="width: 650px">
<div class="grid-container">
<div style="grid-column: 2;"></div>
<div></div>
<div style="grid-column: 12;"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="grid-column: 2;"></div>
<div></div>
<div style="grid-column: 5;"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div></div>
<div></div>
<div style="grid-column: 5;"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<!-- Test correct tracking of collapsed tracks when the grid begins in the middle of the repeat. -->
<div class="holder">
<div class="grid-container">
<div style="grid-column: 4;"></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<!-- Test grid span with correct tracking of collapsed tracks. -->
<div class="holder" style="width: 510px">
<div class="grid-container">
<div></div>
<div style="grid-column: 4 / 7;"></div>
<div></div>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,216 @@
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="help" href="https://www.w3.org/TR/css-grid-1/#named-lines" title="5.1.1. Named Grid Lines: the '(&lt;custom-ident\&gt;*)' syntax">
<link rel="help" href="https://www.w3.org/TR/css-grid-1/#valdef-repeat-auto-fill" title="7.2.2.2. Repeat-to-fill: 'auto-fill' and 'auto-fit' repetitions">
<style>
.holder {
width: 300px;
height: 20px;
border-bottom: 2px solid #cfbfcf;
}
.holder > :nth-child(2) {
clear: left; /* Forces the div to a new line to simulate a new grid row. */
padding-top: 2px; /* Simulates the grid row gap. */
}
.grid-container > * { float: left; height: 8px; }
.grid-container > :nth-child(3n) { background: sienna; }
.grid-container > :nth-child(3n+1) { background: gold; }
.grid-container > :nth-child(3n+2) { background: orange; }
.alt-color > :nth-child(2n) { background: sienna; }
.alt-color > :nth-child(2n+1) { background: orange; }
.invis { width: 0px; visibility: none; }
</style>
<p>The test passes if it has the same visual effect as reference.</p>
<div class="holder">
<div class="grid-container">
<div style="width:30px; margin-left:30px"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:50px; margin-left:170px"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:30px; margin-left:30px"></div>
<div style="width:30px; margin-left:40px"></div>
<div style="width:40px;"></div>
<div style="width:50px;"></div>
<div style="width:60px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:10px;"></div>
<div style="width:30px; margin-left:20px"></div>
<div style="width:30px; margin-left:40px"></div>
<div style="width:40px;"></div>
<div style="width:50px;"></div>
<div style="width:60px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:30px; margin-left:30px"></div>
<div style="width:50px; margin-left:110px"></div>
<div style="width:60px;"></div>
</div>
<div class="grid-container">
<div style="width:10px"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:10px;"></div>
<div style="width:30px; margin-left:20px"></div>
<div style="width:50px; margin-left:110px"></div>
<div style="width:60px;"></div>
</div>
<div class="grid-container">
<div class="invis"></div>
<div style="width:10px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:50px; margin-left:10px;"></div>
<div style="width:40px;"></div>
<div style="width:30px;"></div>
<div style="width:40px;"></div>
<div style="width:50px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:90px; margin-left:10px;"></div>
<div style="width:30px;"></div>
<div style="width:40px;"></div>
<div style="width:50px;"></div>
<div style="width:60px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div class="invis"></div>
<div style="width:10px;"></div>
<div class="invis"></div>
<div style="width:90px;"></div>
<div class="invis"></div>
<div style="width:30px;"></div>
<div style="width:40px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container alt-color">
<div class="invis"></div>
<div style="width:10px;"></div>
<div style="width:120px;"></div>
<div style="width:40px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:10px;"></div>
<div style="width:90px;"></div>
<div style="width:30px;"></div>
<div style="width:40px;"></div>
<div style="width:50px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div class="invis"></div>
<div style="width:10px;"></div>
<div class="invis"></div>
<div style="width:50px;"></div>
<div class="invis"></div>
<div style="width:40px;"></div>
<div style="width:30px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container alt-color">
<div class="invis"></div>
<div style="width:10px;"></div>
<div style="width:90px;"></div>
<div style="width:30px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:10px;"></div>
<div style="width:50px;"></div>
<div style="width:40px;"></div>
<div style="width:30px;"></div>
<div style="width:40px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:10px;"></div>
<div style="width:20px;"></div>
<div style="width:140px;"></div>
<div style="width:50px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:10px;"></div>
<div class="invis"></div>
<div style="width:20px;"></div>
<div class="invis"></div>
<div style="width:140px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container alt-color">
<div style="width:30px;"></div>
<div style="width:140px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div class="invis"></div>
<div style="width:10px;"></div>
<div class="invis"></div>
<div style="width:140px; margin-left:20px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div class="invis"></div>
<div style="width:10px;"></div>
<div class="invis"></div>
<div style="width:210px;"></div>
</div>
</div>

View file

@ -0,0 +1,219 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Support for named grid lines when 'grid-template-columns' and 'grid-template-rows' have multiple values inside of a repeat.</title>
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="help" href="https://www.w3.org/TR/css-grid-1/#named-lines" title="5.1.1. Named Grid Lines: the '(&lt;custom-ident\&gt;*)' syntax">
<link rel="help" href="https://www.w3.org/TR/css-grid-1/#valdef-repeat-auto-fill" title="7.2.2.2. Repeat-to-fill: 'auto-fill' and 'auto-fit' repetitions">
<link rel="match" href="grid-support-named-grid-lines-002-ref.html">
<style>
.holder {
width: 300px;
height: 20px;
border-bottom: 2px solid #cfbfcf;
}
.grid-container {
display: grid;
/*
Defines the grid areas 'repeat', which covers the repeat only, and
'around-repeat' which covers the repeat and one track on either end.
Provides the line name 'all' in every track, the line names 'v' and 'u'
which alternate in every grid line.
*/
grid-template-columns: [v] 10px [around-repeat-start a t-start w-start u all] 20px [repeat-start b] repeat(auto-fill, [all x v] 30px [all w-end y u] 40px [all t-end z]) [repeat-end c v] 50px [around-repeat-end all d u] 60px [e v];
grid-template-rows:
[w-start t-start around-repeat-start repeat-start]
repeat(auto-fill, 8px)
[w-end t-end around-repeat-end repeat-end ]
8px;
grid-row-gap: 2px;
}
.grid-container > :nth-child(3n) { background: sienna; }
.grid-container > :nth-child(3n+1) { background: gold; }
.grid-container > :nth-child(3n+2) { background: orange; }
/* Alternate colors for some grid containers, where sometimes multiple grid
items would appear as one item or the actual ordering would be ambiguous
otherwise. */
.alt-color > :nth-child(2n) { background: sienna; }
.alt-color > :nth-child(2n+1) { background: orange; }
</style>
<p>The test passes if it has the same visual effect as reference.</p>
<!-- Use the line names just before and just after the repeat. -->
<div class="holder">
<div class="grid-container">
<div style="grid-column:b / span 1"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="grid-column:c / span 1"></div>
</div>
</div>
<!-- Use line names that are inside a repeat. -->
<div class="holder">
<div class="grid-container">
<div style="grid-column-start:x"></div>
<div style="grid-column-start:z"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div></div>
<div style="grid-column-start:x"></div>
<div style="grid-column-start:z"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="grid-column-start:x 1"></div>
<div style="grid-column-start:z 2"></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div></div>
<div style="grid-column-start:x 1"></div>
<div style="grid-column-start:z 2"></div>
<div></div>
<div></div>
</div>
</div>
<!-- Using a span that goes from outside a repeat to inside the repeat. -->
<div class="holder">
<div class="grid-container">
<div style="grid-column:u / y"></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="grid-column:u / z"></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<!-- Using an area which has one end inside the repeat. -->
<div class="holder">
<div class="grid-container">
<div style="grid-area: t;"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container alt-color">
<div style="grid-area: t;"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div></div>
<div style="grid-area: t;"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="grid-area: w;"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container alt-color">
<div style="grid-area: w;"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div></div>
<div style="grid-area: w;"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<!-- Using an area which spans the entire repeat. -->
<div class="holder">
<div class="grid-container">
<div></div>
<div></div>
<div style="grid-area: repeat;"></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div></div>
<div style="grid-area: repeat;"></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container alt-color">
<div></div>
<div style="grid-area: repeat;"></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="grid-area: repeat;"></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="grid-area: around-repeat;"></div>
<div></div>
</div>
</div>

View file

@ -0,0 +1,222 @@
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="help" href="https://www.w3.org/TR/css-grid-1/#named-lines" title="5.1.1. Named Grid Lines: the '(&lt;custom-ident\&gt;*)' syntax">
<link rel="help" href="https://www.w3.org/TR/css-grid-1/#valdef-repeat-auto-fill" title="7.2.2.2. Repeat-to-fill: 'auto-fill' and 'auto-fit' repetitions">
<style>
.holder {
width: 300px;
height: 20px;
border-bottom: 2px solid #cfbfcf;
}
.holder > :nth-child(2) {
clear: left; /* Forces the div to a new line to simulate a new grid row. */
padding-top: 2px; /* Simulates the grid row gap. */
}
.grid-container > * { float: left; height: 8px; }
.grid-container > :nth-child(3n) { background: sienna; }
.grid-container > :nth-child(3n+1) { background: gold; }
.grid-container > :nth-child(3n+2) { background: orange; }
.alt-color > :nth-child(2n) { background: sienna; }
.alt-color > :nth-child(2n+1) { background: orange; }
.invis { width: 0px; visibility: none; }
</style>
<p>The test passes if it has the same visual effect as reference.</p>
<div class="holder">
<div class="grid-container">
<div style="width:30px; margin-left:30px"></div>
<div style="width:30px;"></div>
<div style="width:40px;"></div>
<div style="width:50px;"></div>
<div style="width:60px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:10px;"></div>
<div style="width:30px; margin-left:20px"></div>
<div style="width:30px;"></div>
<div style="width:40px;"></div>
<div style="width:50px;"></div>
<div style="width:60px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:30px; margin-left:30px"></div>
<div style="width:50px;"></div>
<div style="width:60px;"></div>
</div>
<div class="grid-container">
<div style="width:10px"></div>
<div style="width:20px"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:10px;"></div>
<div style="width:30px; margin-left:20px;"></div>
<div style="width:50px;"></div>
<div style="width:60px;"></div>
</div>
<div class="grid-container">
<div class="invis"></div>
<div style="width:10px"></div>
<div style="width:20px"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:50px; margin-left:10px;"></div>
<div style="width:40px;"></div>
<div style="width:30px;"></div>
<div style="width:40px;"></div>
<div style="width:50px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:90px; margin-left:10px;"></div>
<div style="width:30px;"></div>
<div style="width:40px;"></div>
<div style="width:50px;"></div>
<div style="width:60px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div class="invis"></div>
<div style="width:10px;"></div>
<div class="invis"></div>
<div style="width:90px;"></div>
<div class="invis"></div>
<div style="width:30px;"></div>
<div style="width:40px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container alt-color">
<div class="invis"></div>
<div style="width:10px;"></div>
<div style="width:120px;"></div>
<div style="width:40px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:10px;"></div>
<div style="width:90px;"></div>
<div style="width:30px;"></div>
<div style="width:40px;"></div>
<div style="width:50px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div class="invis"></div>
<div style="width:10px;"></div>
<div class="invis"></div>
<div style="width:50px;"></div>
<div class="invis"></div>
<div style="width:40px;"></div>
<div style="width:30px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container alt-color">
<div class="invis"></div>
<div style="width:10px;"></div>
<div style="width:90px;"></div>
<div style="width:30px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:10px;"></div>
<div style="width:50px;"></div>
<div style="width:40px;"></div>
<div style="width:30px;"></div>
<div style="width:40px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:10px;"></div>
<div style="width:20px;"></div>
<div style="width:140px;"></div>
<div style="width:50px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:10px;"></div>
<div class="invis"></div>
<div style="width:20px;"></div>
<div class="invis"></div>
<div style="width:140px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container alt-color">
<div style="width:30px;"></div>
<div style="width:140px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div class="invis"></div>
<div style="width:10px;"></div>
<div class="invis"></div>
<div style="width:140px; margin-left:20px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="width:10px;"></div>
<div style="width:210px;"></div>
<div style="width:60px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container alt-color">
<div style="width:10px;"></div>
<div style="width:210px;"></div>
<div style="width:60px;"></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div class="invis"></div>
<div style="width:10px;"></div>
<div class="invis"></div>
<div style="width:210px;"></div>
</div>
</div>

View file

@ -0,0 +1,224 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Support for named grid lines when 'grid-template-columns' and 'grid-template-rows' have multiple values inside of a repeat.</title>
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="help" href="https://www.w3.org/TR/css-grid-1/#named-lines" title="5.1.1. Named Grid Lines: the '(&lt;custom-ident\&gt;*)' syntax">
<link rel="help" href="https://www.w3.org/TR/css-grid-1/#valdef-repeat-auto-fill" title="7.2.2.2. Repeat-to-fill: 'auto-fill' and 'auto-fit' repetitions">
<link rel="match" href="grid-support-named-grid-lines-003-ref.html">
<style>
.holder {
width: 300px;
height: 20px;
border-bottom: 2px solid #cfbfcf;
}
.grid-container {
display: grid;
/*
Defines the grid areas 'repeat', which covers the repeat only, and
'around-repeat' which covers the repeat and one track on either end.
Provides the line name 'all' in every track, the line names 'v' and 'u'
which alternates in every grid line.
*/
grid-template-columns: [v] 10px [around-repeat-start a t-start w-start u all] 20px [repeat-start b] repeat(auto-fit, [all x v] 30px [all w-end y u] 40px [all t-end z]) [repeat-end c v] 50px [around-repeat-end all d u] 60px [e v];
grid-template-rows:
[w-start t-start around-repeat-start repeat-start]
repeat(auto-fit, 8px)
[w-end t-end around-repeat-end repeat-end ]
8px;
grid-row-gap: 2px;
}
.grid-container > :nth-child(3n) { background: sienna; }
.grid-container > :nth-child(3n+1) { background: gold; }
.grid-container > :nth-child(3n+2) { background: orange; }
/* Alternate colors for some grid containers, where sometimes multiple grid
items would appear as one item or the actual ordering would be ambiguous
otherwise. */
.alt-color > :nth-child(2n) { background: sienna; }
.alt-color > :nth-child(2n+1) { background: orange; }
</style>
<p>The test passes if it has the same visual effect as reference.</p>
<!-- Use line names that are inside a repeat. -->
<div class="holder">
<div class="grid-container">
<div style="grid-column-start:x"></div>
<div style="grid-column-start:z"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div></div>
<div style="grid-column-start:x"></div>
<div style="grid-column-start:z"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="grid-column-start:x 1"></div>
<div style="grid-column-start:z 2"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div></div>
<div style="grid-column-start:x 1"></div>
<div style="grid-column-start:z 2"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<!-- Using a span that goes from outside a repeat to inside the repeat. -->
<div class="holder">
<div class="grid-container">
<div style="grid-column:u / y"></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="grid-column:u / z"></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<!-- Using an area which has one end inside the repeat. -->
<div class="holder">
<div class="grid-container">
<div style="grid-area: t;"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container alt-color">
<div style="grid-area: t;"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div></div>
<div style="grid-area: t;"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="grid-area: w;"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container alt-color">
<div style="grid-area: w;"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div></div>
<div style="grid-area: w;"></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<!-- Using an area which spans the entire repeat. -->
<div class="holder">
<div class="grid-container">
<div></div>
<div></div>
<div style="grid-area: repeat;"></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div></div>
<div style="grid-area: repeat;"></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container alt-color">
<div></div>
<div style="grid-area: repeat;"></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="grid-area: repeat;"></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div></div>
<div style="grid-area: around-repeat;"></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container alt-color">
<div></div>
<div style="grid-area: around-repeat;"></div>
<div></div>
</div>
</div>
<div class="holder">
<div class="grid-container">
<div style="grid-area: around-repeat;"></div>
<div></div>
</div>
</div>

View file

@ -80,6 +80,12 @@ test_computed_value("grid-template-columns", 'repeat(auto-fill, minmax(100px, 5f
'100px [two] 100px [two] 100px [two]');
test_computed_value("grid-template-columns", 'repeat(auto-fit, [three] minmax(max-content, 6em) [four])',
'[three] 240px [four]');
test_computed_value('grid-template-columns', '[a] 21px [b] repeat(auto-fill, [c] 22px [d] 23px [e]) [f] 24px [g]',
'[a] 21px [b c] 22px [d] 23px [e c] 22px [d] 23px [e c] 22px [d] 23px [e c] 22px [d] 23px [e c] 22px [d] 23px [e f] 24px [g]');
test_computed_value('grid-template-columns', '[a] 21px [b c] repeat(auto-fill, [d e] 22px [f g h] 23px [i j k l]) [m n] 24px [o]',
'[a] 21px [b c d e] 22px [f g h] 23px [i j k l d e] 22px [f g h] 23px [i j k l d e] 22px [f g h] 23px [i j k l d e] 22px [f g h] 23px [i j k l d e] 22px [f g h] 23px [i j k l m n] 24px [o]');
test_computed_value('grid-template-columns', '[a] repeat(2, [b] 20px [c d] 21px [e f g]) [h i] repeat(auto-fit, [j] 22px [k l m] 23px [n o p q]) [r s]',
'[a b] 20px [c d] 21px [e f g b] 20px [c d] 21px [e f g h i j] 0px [k l m] 0px [n o p q j] 0px [k l m] 0px [n o p q j] 0px [k l m] 0px [n o p q j] 0px [k l m] 0px [n o p q r s]');
// <auto-track-list> =
// [ <line-names>? [ <fixed-size> | <fixed-repeat> ] ]* <line-names>?

View file

@ -0,0 +1,57 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Grid Layout Test: getComputedStyle().gridTemplateColumns</title>
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-template-columns">
<meta name="assert" content="grid-template-columns computed value is the keyword none or a computed track list.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<script src="/css/css-grid/support/grid-child-utils.js"></script>
<style>
#target {
display: grid;
width: 32px;
height: 10px;
};
</style>
</head>
<body>
<div id="container">
<div id="target">
<div></div>
<div></div>
<div id="child"></div>
<div style="grid-column: 7"></div>
<div></div>
</div>
</div>
<script>
let autoFitTester = new GridChildHelper(gridChildHelperCol,
"[a] 1px [b] 2px [c d] repeat(auto-fit, [e f] 3px [g] 4px [h]) [i] 5px [k] 6px [l m] ");
let autoFillTester = new GridChildHelper(gridChildHelperCol,
"[a] 1px [b] 2px [c d] repeat(auto-fill, [e f] 3px [g] 4px [h]) [i] 5px [k] 6px [l m] ");
// Auto-fit
autoFitTester.runTest(3, "[a] 1px [b] 2px [c d e f] 3px [g] 0px [h e f] 0px [g] 0px [h i] 5px [k] 6px [l m]");
autoFitTester.runTest(4, "[a] 1px [b] 2px [c d e f] 0px [g] 4px [h e f] 0px [g] 0px [h i] 5px [k] 6px [l m]");
autoFitTester.runTest(5, "[a] 1px [b] 2px [c d e f] 0px [g] 0px [h e f] 3px [g] 0px [h i] 5px [k] 6px [l m]");
autoFitTester.runTest(6, "[a] 1px [b] 2px [c d e f] 0px [g] 0px [h e f] 0px [g] 4px [h i] 5px [k] 6px [l m]");
autoFitTester.runTest("4 / 5", "[a] 1px [b] 2px [c d e f] 0px [g] 4px [h e f] 0px [g] 0px [h i] 5px [k] 6px [l m]");
autoFitTester.runTest("4 / 6", "[a] 1px [b] 2px [c d e f] 0px [g] 4px [h e f] 3px [g] 0px [h i] 5px [k] 6px [l m]");
autoFitTester.runTest("3 / 6", "[a] 1px [b] 2px [c d e f] 3px [g] 4px [h e f] 3px [g] 0px [h i] 5px [k] 6px [l m]");
// Auto-fill. These tests are semi-redundant, but should still pass.
autoFillTester.runTest(3, "[a] 1px [b] 2px [c d e f] 3px [g] 4px [h e f] 3px [g] 4px [h i] 5px [k] 6px [l m]");
autoFillTester.runTest(4, "[a] 1px [b] 2px [c d e f] 3px [g] 4px [h e f] 3px [g] 4px [h i] 5px [k] 6px [l m]");
autoFillTester.runTest(5, "[a] 1px [b] 2px [c d e f] 3px [g] 4px [h e f] 3px [g] 4px [h i] 5px [k] 6px [l m]");
autoFillTester.runTest("4 / 7", "[a] 1px [b] 2px [c d e f] 3px [g] 4px [h e f] 3px [g] 4px [h i] 5px [k] 6px [l m]");
autoFillTester.runTest("3 / 6", "[a] 1px [b] 2px [c d e f] 3px [g] 4px [h e f] 3px [g] 4px [h i] 5px [k] 6px [l m]");
</script>
</body>
</html>

View file

@ -0,0 +1,85 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Grid Layout Test: getComputedStyle().gridTemplateColumns</title>
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-template-columns">
<meta name="assert" content="grid-template-columns computed value is the keyword none or a computed track list.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<script src="/css/css-grid/support/grid-child-utils.js"></script>
<style>
#target {
display: grid;
width: 54px;
height: 32px;
};
</style>
</head>
<body>
<div id="container">
<div id="target">
<div></div>
<div></div>
<div style="grid-column: 4"></div>
<div id="child"></div>
<div style="grid-column: 10"></div>
<div></div>
</div>
</div>
<script>
// Style with 3 repeat tracks.
let style3 =
"[a] 1px [b] 2px [c d] repeat(auto-fit, [e f] 3px [g] 4px [h] 5px [i j]) [k] 7px [k] 8px [l m]";
let col3Tester = new GridChildHelper(gridChildHelperCol, style3);
let rowTester = new GridChildHelper(gridChildHelperRow, style3);
// Style with 2 repeat tracks.
let style2 =
"[a] 1px [b] 2px [c d] repeat(auto-fit, [e f] 3px [g] 4px [h]) [i j] 7px [k] 8px [l m]";
let col2Tester = new GridChildHelper(gridChildHelperCol, style2);
rowTester.runTest(3,
"[a] 1px [b] 2px [c d e f] 3px [g] 0px [h] 0px [i j k] 7px [k] 8px [l m]");
rowTester.runTest(5,
"[a] 1px [b] 2px [c d e f] 0px [g] 0px [h] 5px [i j k] 7px [k] 8px [l m]");
rowTester.runTest("3 / 8",
"[a] 1px [b] 2px [c d e f] 3px [g] 4px [h] 5px [i j k] 7px [k] 8px [l m]");
rowTester.runTest("4 / span 2",
"[a] 1px [b] 2px [c d e f] 0px [g] 4px [h] 5px [i j k] 7px [k] 8px [l m]");
rowTester.runTest("4 / 5",
"[a] 1px [b] 2px [c d e f] 0px [g] 4px [h] 0px [i j k] 7px [k] 8px [l m]");
col3Tester.runTest(3,
"[a] 1px [b] 2px [c d e f] 3px [g] 4px [h] 0px [i j e f] 0px [g] 0px [h] 0px [i j e f] 0px [g] 4px [h] 5px [i j k] 7px [k] 8px [l m]");
col3Tester.runTest(6,
"[a] 1px [b] 2px [c d e f] 0px [g] 4px [h] 0px [i j e f] 3px [g] 0px [h] 0px [i j e f] 0px [g] 4px [h] 5px [i j k] 7px [k] 8px [l m]");
col3Tester.runTest("3 / 8",
"[a] 1px [b] 2px [c d e f] 3px [g] 4px [h] 5px [i j e f] 3px [g] 4px [h] 0px [i j e f] 0px [g] 4px [h] 5px [i j k] 7px [k] 8px [l m]");
col3Tester.runTest("5 / span 2",
"[a] 1px [b] 2px [c d e f] 0px [g] 4px [h] 5px [i j e f] 3px [g] 0px [h] 0px [i j e f] 0px [g] 4px [h] 5px [i j k] 7px [k] 8px [l m]");
col3Tester.runTest("7 / span 2",
"[a] 1px [b] 2px [c d e f] 0px [g] 4px [h] 0px [i j e f] 0px [g] 4px [h] 5px [i j e f] 0px [g] 4px [h] 5px [i j k] 7px [k] 8px [l m]");
col3Tester.runTest("5 / 8",
"[a] 1px [b] 2px [c d e f] 0px [g] 4px [h] 5px [i j e f] 3px [g] 4px [h] 0px [i j e f] 0px [g] 4px [h] 5px [i j k] 7px [k] 8px [l m]");
col3Tester.runTest("8 / 10",
"[a] 1px [b] 2px [c d e f] 0px [g] 4px [h] 0px [i j e f] 0px [g] 0px [h] 5px [i j e f] 3px [g] 4px [h] 5px [i j k] 7px [k] 8px [l m]");
col2Tester.runTest(3,
"[a] 1px [b] 2px [c d e f] 3px [g] 4px [h e f] 0px [g] 0px [h e f] 0px [g] 0px [h e f] 0px [g] 4px [h e f] 3px [g] 0px [h i j] 7px [k] 8px [l m]");
col2Tester.runTest(6,
"[a] 1px [b] 2px [c d e f] 0px [g] 4px [h e f] 0px [g] 4px [h e f] 0px [g] 0px [h e f] 0px [g] 4px [h e f] 3px [g] 0px [h i j] 7px [k] 8px [l m]");
col2Tester.runTest("3 / 8",
"[a] 1px [b] 2px [c d e f] 3px [g] 4px [h e f] 3px [g] 4px [h e f] 3px [g] 0px [h e f] 0px [g] 4px [h e f] 3px [g] 0px [h i j] 7px [k] 8px [l m]");
col2Tester.runTest("6 / span 2",
"[a] 1px [b] 2px [c d e f] 0px [g] 4px [h e f] 0px [g] 4px [h e f] 3px [g] 0px [h e f] 0px [g] 4px [h e f] 3px [g] 0px [h i j] 7px [k] 8px [l m]");
col2Tester.runTest("5 / 10",
"[a] 1px [b] 2px [c d e f] 0px [g] 4px [h e f] 3px [g] 4px [h e f] 3px [g] 4px [h e f] 3px [g] 4px [h e f] 3px [g] 0px [h i j] 7px [k] 8px [l m]");
</script>
</body>
</html>

View file

@ -0,0 +1,49 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: getComputedStyle().gridTemplateColumns</title>
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="help" href="https://drafts.csswg.org/css-grid-2/#resolved-track-list" "title"="2.3. Resolved Value of a Track Listing">
<meta name="assert" content="Checks the resolved value of grid-template-columns or grid-template-columns on an element which is not a grid container.">
<style>
#target {
display: block;
height: 1px;
font-size: 1px;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<div id="target"></div>
<script>
test_computed_value("grid-template-columns", "subgrid [a]");
test_computed_value("grid-template-columns", "subgrid [a] [b]");
test_computed_value("grid-template-columns", "subgrid [a] [b] [b] [c]");
test_computed_value("grid-template-columns", "subgrid [a] [b c d] [e f] [e f] [g]");
test_computed_value("grid-template-columns", "subgrid [a b c] [d] [e f]");
test_computed_value("grid-template-columns", "subgrid repeat(auto-fill, [c])");
test_computed_value("grid-template-columns", "subgrid repeat(auto-fill, [c]) [g] [h i]");
test_computed_value("grid-template-columns", "subgrid [a] repeat(auto-fill, [c]) [g] [h i]");
test_computed_value("grid-template-columns", "subgrid [a b] repeat(auto-fill, [c]) [g]");
test_computed_value("grid-template-columns", "subgrid [a] [b] repeat(auto-fill, [c]) [g h]");
test_computed_value("grid-template-columns", "subgrid [a] [b] repeat(auto-fill, [c])");
test_computed_value("grid-template-columns", "subgrid repeat(auto-fill, [c d])");
test_computed_value("grid-template-columns", "subgrid repeat(auto-fill, [c d]) [g] [h i]");
test_computed_value("grid-template-columns", "subgrid [a] repeat(auto-fill, [c d]) [g] [h i]");
test_computed_value("grid-template-columns", "subgrid [a b] repeat(auto-fill, [c d]) [g]");
test_computed_value("grid-template-columns", "subgrid [a] [b] repeat(auto-fill, [c d]) [g h]");
test_computed_value("grid-template-columns", "subgrid [a] [b] repeat(auto-fill, [c d])");
test_computed_value("grid-template-columns", "subgrid repeat(auto-fill, [c] [d])");
test_computed_value("grid-template-columns", "subgrid repeat(auto-fill, [c] [d]) [g] [h i]");
test_computed_value("grid-template-columns", "subgrid [a] repeat(auto-fill, [c] [d]) [g] [h i]");
test_computed_value("grid-template-columns", "subgrid [a b] repeat(auto-fill, [c] [d]) [g]");
test_computed_value("grid-template-columns", "subgrid [a] [b] repeat(auto-fill, [c] [d]) [g h]");
test_computed_value("grid-template-columns", "subgrid [a] [b] repeat(auto-fill, [c] [d])");
test_computed_value("grid-template-columns", "subgrid repeat(auto-fill, [c] [d e])");
test_computed_value("grid-template-columns", "subgrid repeat(auto-fill, [c] [d e]) [g] [h i]");
test_computed_value("grid-template-columns", "subgrid [a] repeat(auto-fill, [c] [d e]) [g] [h i]");
test_computed_value("grid-template-columns", "subgrid [a b] repeat(auto-fill, [c] [d e]) [g]");
test_computed_value("grid-template-columns", "subgrid [a] [b] repeat(auto-fill, [c] [d e]) [g h]");
test_computed_value("grid-template-columns", "subgrid [a] [b] repeat(auto-fill, [c] [d e])");
</script>

View file

@ -0,0 +1,322 @@
<!DOCTYPE HTML>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html>
<head>
<style>
html,body {
color:black; background-color:white; font:10px/1 monospace; padding:0; margin:0;
}
.grid {
display: inline-grid;
grid-auto-columns: 15px;
border: 1px solid;
}
.subgrid {
display: grid;
grid-column: 3 / span 4;
grid-auto-rows: 8px;
background: grey;
}
.fill-0a { grid-template-columns: subgrid [z] [z] [z] [z] [z] } /* [z] [z] [z] [z] [z] */
.fill-0b { grid-template-columns: subgrid [z] [z] [z] [z] [z] } /* [z] [z] [z] [z] [z] */
.fill-0c { grid-template-columns: subgrid [x] [y] [y] [y] [z] } /* [x] [y] [y] [y] [z] */
.fill-0d { grid-template-columns: subgrid [x] [z] [z] [z] [z] } /* [x] [z] [z] [z] [z] */
.fill-0e { grid-template-columns: subgrid [x] [x] [x] [x] [z] } /* [x] [x] [x] [x] [z] */
.fill-0f { grid-template-columns: subgrid [x] [x] [z] [z] [z] } /* [x] [x] [z] [z] [z] */
.fill-0g { grid-template-columns: subgrid [x] [y] [z] [z] } /* [x] [y] [z] [z] [] */
.fill-0h { grid-template-columns: subgrid [x] [y] [x] [y] [z] } /* [x] [y] [x] [y] [z] */
.fill-0i { grid-template-columns: subgrid [x] [y] [x] [y] } /* [x] [y] [x] [y] [] */
.fill-0j { grid-template-columns: subgrid [y] [y] [y] [z] [z] } /* [y] [y] [y] [z] [z] */
.fill-0k { grid-template-columns: subgrid [x] [y] [z] [z] } /* [x] [y] [z] [z] [] */
.fill-0l { grid-template-columns: subgrid [z] [x] [y] [z] } /* [z] [x] [y] [z] [] */
.fill-0m { grid-template-columns: subgrid [z] [x] [y] [x] [y] } /* [z] [x] [y] [x] [y] */
.fill-0n { grid-template-columns: subgrid [z] [z] [z] [z] [z] } /* [z] [z] [z] [z] [z] */
.fill-0o { grid-template-columns: subgrid [z] [x] [y] [z] } /* [z] [x] [y] [z] [] */
.fill-0p { grid-template-columns: subgrid [z] [x] [y] [z] [x] } /* [z] [x] [y] [z] [x] */
.fill-0q { grid-template-columns: subgrid [x] [y] [z] [x] } /* [x] [y] [z] [x] [] */
.fill-0r { grid-template-columns: subgrid [x] [y] [z] [y] [z] } /* [x] [y] [z] [y] [z] */
.fill-0s {
grid-column: 2 / span 5;
grid-template-columns: subgrid [w] [y] [z] [y] [z] [x]; /* [w] [y] [z] [y] [z] [x] */
}
.fill-0t {
grid-column: 1 / span 6;
grid-template-columns: subgrid [w] [y] [z] [y] [z] [x]; /* [w] [y] [z] [y] [z] [x] [] */
}
.subgrid > :nth-child(2n) { background: black; }
.subgrid > :nth-child(2n+1) { background: pink; }
</style>
</head>
<body>
<div class="grid"><div class="subgrid fill-0a">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0b">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0c">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0d">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0e">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0f">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0g">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0h">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0i">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0j">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0k">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0l">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0m">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0n">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0o">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0p">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0q">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0r">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0s">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0t">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
</body>

View file

@ -0,0 +1,358 @@
<!DOCTYPE HTML>
<html>
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="match" href="repeat-auto-fill-008-ref.html">
<link rel="help" href="https://drafts.csswg.org/css-grid-2/#resolved-track-list">
<head>
<style>
html,body {
color:black; background-color:white; font:10px/1 monospace; padding:0; margin:0;
}
.grid {
display: inline-grid;
grid-auto-columns: 15px;
border: 1px solid;
}
.subgrid {
display: grid;
grid-column: 3 / span 4;
grid-auto-rows: 8px;
background: grey;
}
.fill-0a { grid-template-columns: subgrid repeat(auto-fill, [y] [y]) [z] [z] [z] [z] [z] } /* [z] [z] [z] [z] [z] */
.fill-0b { grid-template-columns: subgrid [z] repeat(auto-fill, [z] [z] [z]) [z] } /* [z] [z] [z] [z] [z] */
.fill-0c { grid-template-columns: subgrid [x] repeat(auto-fill, [y] [y] [y]) [z] } /* [x] [y] [y] [y] [z] */
.fill-0d { grid-template-columns: subgrid [x] repeat(auto-fill, [z] [z]) } /* [x] [z] [z] [z] [z] */
.fill-0e { grid-template-columns: subgrid repeat(auto-fill, [x] [x]) [z] } /* [x] [x] [x] [x] [z] */
.fill-0f { grid-template-columns: subgrid repeat(auto-fill, [x] [x]) [z] [z] [z] } /* [x] [x] [z] [z] [z] */
.fill-0g { grid-template-columns: subgrid repeat(auto-fill, [x] [y]) [z] [z] } /* [x] [y] [z] [z] [] */
.fill-0h { grid-template-columns: subgrid repeat(auto-fill, [x] [y]) [z] } /* [x] [y] [x] [y] [z] */
.fill-0i { grid-template-columns: subgrid repeat(auto-fill, [x] [y]) } /* [x] [y] [x] [y] [] */
.fill-0j { grid-template-columns: subgrid repeat(auto-fill, [y]) [z] [z] } /* [y] [y] [y] [z] [z] */
.fill-0k { grid-template-columns: subgrid repeat(auto-fill, [x] [y]) [z] [z] } /* [x] [y] [z] [z] [] */
.fill-0l { grid-template-columns: subgrid [z] repeat(auto-fill, [x] [y]) [z] } /* [z] [x] [y] [z] [] */
.fill-0m { grid-template-columns: subgrid [z] repeat(auto-fill, [x] [y]) } /* [z] [x] [y] [x] [y] */
.fill-0n { grid-template-columns: subgrid repeat(auto-fill, [x] [y]) repeat(100, [z])} /* [z] [z] [z] [z] [z] */
.fill-0o { grid-template-columns: subgrid [z] repeat(auto-fill, [x] [y] [z]) } /* [z] [x] [y] [z] [] */
.fill-0p { grid-template-columns: subgrid [z] repeat(auto-fill, [x] [y] [z]) [x] } /* [z] [x] [y] [z] [x] */
.fill-0q { grid-template-columns: subgrid repeat(auto-fill, [x] [y] [z]) [x] } /* [x] [y] [z] [x] [] */
.fill-0r { grid-template-columns: subgrid [x] repeat(auto-fill, [y] [z]) } /* [x] [y] [z] [y] [z] */
/* With span of 5... */
.fill-0s {
grid-column: 2 / span 5;
grid-template-columns: subgrid [w] repeat(auto-fill, [y] [z]) [x]; /* [w] [y] [z] [y] [z] [x] */
}
/* With span of 6, same as fill-0s but with room for a partial additional repetition */
.fill-0t {
grid-column: 1 / span 6;
grid-template-columns: subgrid [w] repeat(auto-fill, [y] [z]) [x]; /* [w] [y] [z] [y] [z] [x] [] */
}
.subgrid > :nth-child(2n) { background: black; }
.subgrid > :nth-child(2n+1) { background: pink; }
</style>
</head>
<body>
<div class="grid"><div class="subgrid fill-0a">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0b">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0c">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0d">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0e">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0f">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0g">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0h">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0i">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0j">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0k">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0l">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0m">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0n">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0o">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0p">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0q">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0r">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0s">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<div class="grid"><div class="subgrid fill-0t">
<div style="grid-column:y 5"></div>
<div style="grid-column:y 4"></div>
<div style="grid-column:y 3"></div>
<div style="grid-column:y 2"></div>
<div style="grid-column:y 1"></div>
<div style="grid-column:y -1"></div>
<div style="grid-column:y -2"></div>
<div style="grid-column:y -3"></div>
<div style="grid-column:y -4"></div>
<div style="grid-column:y -5"></div>
</div></div>
<script>
const expectedResults = [
"subgrid [z] [z] [z] [z] [z]",
"subgrid [z] [z] [z] [z] [z]",
"subgrid [x] [y] [y] [y] [z]",
"subgrid [x] [z] [z] [z] [z]",
"subgrid [x] [x] [x] [x] [z]",
"subgrid [x] [x] [z] [z] [z]",
"subgrid [x] [y] [z] [z] []",
"subgrid [x] [y] [x] [y] [z]",
"subgrid [x] [y] [x] [y] []",
"subgrid [y] [y] [y] [z] [z]",
"subgrid [x] [y] [z] [z] []",
"subgrid [z] [x] [y] [z] []",
"subgrid [z] [x] [y] [x] [y]",
"subgrid [z] [z] [z] [z] [z]",
"subgrid [z] [x] [y] [z] []",
"subgrid [z] [x] [y] [z] [x]",
"subgrid [x] [y] [z] [x] []",
"subgrid [x] [y] [z] [y] [z]",
"subgrid [w] [y] [z] [y] [z] [x]",
"subgrid [w] [y] [z] [y] [z] [x] []",
];
[...document.querySelectorAll('.subgrid')].forEach(function(subgrid, i) {
let actual = window.getComputedStyle(subgrid)['grid-template-columns'];
let expected = expectedResults[i];
if (actual != expected) {
let err = "Unexpected getComputedStyle value for subgrid " + i + " with className '" + subgrid.className + "':" +
" Actual: \"" + actual + "\", Expected: \"" + expected + "\"";
document.body.appendChild(document.createTextNode(err));
document.body.appendChild(document.createElement("br"));
}
});
</script>
</body>

View file

@ -0,0 +1,45 @@
// Any copyright is dedicated to the Public Domain.
// https://creativecommons.org/publicdomain/zero/1.0/
const gridChildHelperRow = "row";
const gridChildHelperCol = "col";
// Helper for building testcases for grid-template-* with a child div in
// multiple positions. Prop is expected ot be one of gridChildHelperRow or
// gridChildHelperCol, to select testing grid rows or grid columns,
// respectively.
// The child div is found by the id of 'child'.
function GridChildHelper(prop, style){
this.child = document.getElementById("child");
this.style = style;
this.prop = prop;
}
// Runs a test for computed values on the property the helper object was
// constructed with. The childStyle is used for choosing the grid row/column
// of the child div.
// expected is passed as-is to the computed value test.
// The child style is appended to the test name in such a way that different
// tests for the same parent style but different child style values will have
// different test names.
GridChildHelper.prototype.runTest = function(childStyle, expected) {
'use strict';
const childProps = {
[gridChildHelperCol]:"gridColumn",
[gridChildHelperRow]:"gridRow"
};
const childProp = childProps[this.prop];
const parentProps = {
[gridChildHelperCol]:"grid-template-columns",
[gridChildHelperRow]:"grid-template-rows"
};
const parentProp = parentProps[this.prop];
const oldChildStyle = this.child[childProp];
this.child.style[childProp] = childStyle;
test_computed_value(parentProp, this.style, expected, childProp + " = " + childStyle);
this.child[childProp] = oldChildStyle;
}