Update web-platform-tests to revision 58b72393db0bd273bb93268c33666cf893feb985

This commit is contained in:
Josh Matthews 2017-10-31 08:58:31 -04:00
parent 43a4f01647
commit 64e0a52537
12717 changed files with 59835 additions and 59820 deletions

View file

@ -0,0 +1,107 @@
<!DOCTYPE HTML>
<html>
<head>
<title>CSS Grid Layout: display: grid</title>
<link rel="author" title="swain" href="mailto:swainet@126.com"/>
<link rel="reviewer" title="Dayang Shen" href="mailto:shendayang@baidu.com"/> <!-- 2013-09-17 -->
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers"/>
<link rel="match" href="../reference/display-grid-ref.html">
<meta name="assert" content="'display: grid' causes an element to generate a block-level grid container box."/>
<style type="text/css">
#container {
position:relative;
width:400px;
height:100px;
}
#grid {
display:grid;
grid-template-columns:100px 300px;
grid-template-rows:70px 30px;
height:100%;
}
#cell1 {
grid-column:1;
grid-row:1;
background-color:green;
height:70px;
}
#cell2 {
grid-column:2;
grid-row:1;
background-color:limegreen;
height:70px;
}
#cell3 {
grid-column:1;
grid-row:2;
background-color:limegreen;
height:30px;
}
#cell4 {
grid-column:2;
grid-row:2;
background-color:green;
height:30px;
}
.error {
position:absolute;
top:0;
left:0;
height:100%;
width:100%;
z-index:-1;
}
#table {
width:100%;
height:100%;
border-collapse:collapse;
}
#table td {
padding:0;
vertical-align:top;
}
#table td:first-child {
width:100px;
}
#table tr:last-child td {
height:30px;
}
</style>
</head>
<body>
<p>Test passes if there are 4 green rectangles and no red.</p>
<div id="container">
<div id="grid">
<div id="cell1">cell1</div>
<div id="cell2">cell2</div>
<div id="cell3">cell3</div>
<div id="cell4">cell4</div>
</div>
<div class="error">
<table id="table">
<tbody>
<tr>
<td style="background-color:#f00">cell1</td>
<td style="background-color:#e00">cell2</td>
</tr>
<tr>
<td style="background-color:#e00">cell3</td>
<td style="background-color:#f00">cell4</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,111 @@
<!DOCTYPE HTML>
<html>
<head>
<title>CSS Grid Layout: display: inline-grid</title>
<link rel="author" title="swain" href="mailto:swainet@126.com"/>
<link rel="reviewer" title="Dayang Shen" href="mailto:shendayang@baidu.com"/> <!-- 2013-09-17 -->
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers"/>
<link rel="match" href="../reference/display-inline-grid-ref.html">
<meta name="assert" content="'display: inline-grid' causes an element to generate an inline-level grid container box." />
<style type="text/css">
#container {
position:relative;
}
#grid {
display:inline-grid;
grid-template-columns:100px 300px;
grid-template-rows:70px 30px;
width:400px;
height:100px;
}
#cell1 {
grid-column:1;
grid-row:1;
background-color:green;
height:70px;
}
#cell2 {
grid-column:2;
grid-row:1;
background-color:limegreen;
height:70px;
}
#cell3 {
grid-column:1;
grid-row:2;
background-color:limegreen;
height:30px;
}
#cell4 {
grid-column:2;
grid-row:2;
background-color:green;
height:30px;
}
.error {
position:absolute;
top:0;
left:0;
height:100px;
width:400px;
z-index:-1;
}
#table {
width:100%;
height:100%;
border-collapse:collapse;
}
#table td {
padding:0;
vertical-align:top;
}
#table td:first-child {
width:100px;
}
#table tr:last-child td {
height:30px;
}
span {
vertical-align:top;
}
</style>
</head>
<body>
<p>Test passes if there are 4 green rectangles and no red.</p>
<div id="container">
<div id="grid">
<div id="cell1">cell1</div>
<div id="cell2">cell2</div>
<div id="cell3">cell3</div>
<div id="cell4">cell4</div>
</div>
<span>Inline</span>
<div class="error">
<table id="table">
<tbody>
<tr>
<td style="background-color:#f00">cell1</td>
<td style="background-color:#e00">cell2</td>
</tr>
<tr>
<td style="background-color:#e00">cell3</td>
<td style="background-color:#f00">cell4</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,188 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: Grid container and tracks sizes with box-sizing property</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#intrinsic-sizes">
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#box-sizing">
<meta name="assert" content="The test checks the sizes of a grid container and its track depending on min-size constraints and the box-sizing property.">
<style>
.wrapper {
position: relative;
width: 200px;
height: 100px;
}
.grid {
position: absolute;
left: 0;
top: 0;
display: grid;
border-style: solid;
border-width: 5px 10px 15px 20px;
padding: 17px 13px 7px 3px;
}
.wholeWidth {
right: 0;
}
.wholeHeight {
bottom: 0;
}
.item {
background: cyan;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js">"></script>
<body onload="checkLayout('.grid')">
<div id="log"></div>
<div class="wrapper">
<div class="grid wholeWidth" style="height: 100px;" data-expected-width="200" data-expected-height="144">
<div class="item" data-expected-width="154" data-expected-height="100"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeWidth" style="min-height: 100px;" data-expected-width="200" data-expected-height="144">
<div class="item" data-expected-width="154" data-expected-height="100"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeWidth" style="height: 100px; box-sizing: border-box;" data-expected-width="200" data-expected-height="100">
<div class="item" data-expected-width="154" data-expected-height="56"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeWidth" style="min-height: 100px; box-sizing: border-box;" data-expected-width="200" data-expected-height="100">
<div class="item" data-expected-width="154" data-expected-height="56"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeWidth" style="bottom: 0;" data-expected-width="200" data-expected-height="100">
<div class="item" data-expected-width="154" data-expected-height="56"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeWidth" style="bottom: 0;" data-expected-width="200" data-expected-height="100">
<div class="item" data-expected-width="154" data-expected-height="56"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeWidth" style="bottom: 0; box-sizing: border-box;" data-expected-width="200" data-expected-height="100">
<div class="item" data-expected-width="154" data-expected-height="56"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeWidth" style="bottom: 0; box-sizing: border-box;" data-expected-width="200" data-expected-height="100">
<div class="item" data-expected-width="154" data-expected-height="56"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeWidth" style="height: 100px; bottom: 0;" data-expected-width="200" data-expected-height="144">
<div class="item" data-expected-width="154" data-expected-height="100"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeWidth" style="min-height: 100px; bottom: 0;" data-expected-width="200" data-expected-height="144">
<div class="item" data-expected-width="154" data-expected-height="100"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeWidth" style="height: 100px; bottom: 0; box-sizing: border-box;" data-expected-width="200" data-expected-height="100">
<div class="item" data-expected-width="154" data-expected-height="56"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeWidth" style="min-height: 100px; bottom: 0; box-sizing: border-box;" data-expected-width="200" data-expected-height="100">
<div class="item" data-expected-width="154" data-expected-height="56"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeHeight" style="width: 200px;" data-expected-width="246" data-expected-height="100">
<div class="item" data-expected-width="200" data-expected-height="56"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeHeight" style="min-width: 200px;" data-expected-width="246" data-expected-height="100">
<div class="item" data-expected-width="200" data-expected-height="56"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeHeight" style="width: 200px; box-sizing: border-box;" data-expected-width="200" data-expected-height="100">
<div class="item" data-expected-width="154" data-expected-height="56"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeHeight" style="min-width: 200px; box-sizing: border-box;" data-expected-width="200" data-expected-height="100">
<div class="item" data-expected-width="154" data-expected-height="56"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeHeight" style="right: 0;" data-expected-width="200" data-expected-height="100">
<div class="item" data-expected-width="154" data-expected-height="56"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeHeight" style="right: 0;" data-expected-width="200" data-expected-height="100">
<div class="item" data-expected-width="154" data-expected-height="56"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeHeight" style="right: 0; box-sizing: border-box;" data-expected-width="200" data-expected-height="100">
<div class="item" data-expected-width="154" data-expected-height="56"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeHeight" style="right: 0; box-sizing: border-box;" data-expected-width="200" data-expected-height="100">
<div class="item" data-expected-width="154" data-expected-height="56"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeHeight" style="width: 200px; right: 0;" data-expected-width="246" data-expected-height="100">
<div class="item" data-expected-width="200" data-expected-height="56"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeHeight" style="min-width: 200px; right: 0;" data-expected-width="246" data-expected-height="100">
<div class="item" data-expected-width="200" data-expected-height="56"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeHeight" style="width: 200px; right: 0; box-sizing: border-box;" data-expected-width="200" data-expected-height="100">
<div class="item" data-expected-width="154" data-expected-height="56"></div>
</div>
</div>
<div class="wrapper">
<div class="grid wholeHeight" style="min-width: 200px; right: 0; box-sizing: border-box;" data-expected-width="200" data-expected-height="100">
<div class="item" data-expected-width="154" data-expected-height="56"></div>
</div>
</div>
</body>

View file

@ -0,0 +1,82 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: 'float' affects to the computed value of 'display' on grid items</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="help" href="http://www.w3.org/TR/CSS2/visuren.html#dis-pos-flo" title="9.7 Relationships between 'display', 'position', and 'float'">
<meta name="flags" content="dom">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#grid {
display: grid;
}
#inline-grid {
display: inline-grid;
}
.inline-table {
display: inline-table;
}
.inline {
display: inline;
}
.flex {
display: flex;
}
.float {
float: left;
}
</style>
<div id="log"></div>
<div id="grid">
<div id="grid-inline-table" class="float inline-table"></div>
<div id="grid-inline" class="float inline"></div>
<div id="grid-flex" class="float flex"></div>
</div>
<div id="inline-grid">
<div id="inline-grid-inline-table" class="float inline-table"></div>
<div id="inline-grid-inline" class="float inline"></div>
<div id="inline-grid-flex" class="float flex"></div>
</div>
<script>
function testComputedStyleDisplay(element, value) {
assert_equals(getComputedStyle(element).getPropertyValue("display"), value, "getComputedStyle() display should be '" + value + "'");
}
var gridInlineTable = document.getElementById("grid-inline-table");
test(function() {
testComputedStyleDisplay(gridInlineTable, "table");
}, "Test display floated 'inline-table' grid item");
var gridInline = document.getElementById("grid-inline");
test(function() {
testComputedStyleDisplay(gridInline, "block");
}, "Test display floated 'inline' grid item");
var gridFlex = document.getElementById("grid-flex");
test(function() {
testComputedStyleDisplay(gridFlex, "flex");
}, "Test display floated 'flex' grid item");
var inlineGridInlineTable = document.getElementById("inline-grid-inline-table");
test(function() {
testComputedStyleDisplay(inlineGridInlineTable, "table");
}, "Test display floated 'inline-table' grid item within an inline grid");
var inlineGridInline = document.getElementById("inline-grid-inline");
test(function() {
testComputedStyleDisplay(inlineGridInline, "block");
}, "Test display floated 'inline' grid item within an inline grid");
var inlineGridFlex = document.getElementById("inline-grid-flex");
test(function() {
testComputedStyleDisplay(inlineGridFlex, "flex");
}, "Test display floated 'flex' grid item within an inline grid");
</script>

View file

@ -0,0 +1,35 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: 'grid' value for 'display' property</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <!-- 2014-11-18 -->
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<meta name="flags" content="ahem">
<meta name="assert" content="This test checks that 'grid' value for 'display' property generates a block level containing box.">
<style>
#reference-overlapped-red {
position: absolute;
background-color: red;
width: 100px;
height: 100px;
z-index: -1;
}
.test-grid-overlapping-green {
display: grid;
font: 25px/1 Ahem;
color: green;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="reference-overlapped-red"></div>
<div class="test-grid-overlapping-green">
<span>firs</span>
<span>seco</span>
</div>
<div class="test-grid-overlapping-green">
<span>firs</span>
<span>seco</span>
</div>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: 'inline-grid' value for 'display' property</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <!-- 2014-11-18 -->
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<meta name="assert" content="This test checks that 'inline-grid' value for 'display' property generates an inline level containing box.">
<style>
#reference-overlapped-red {
position: absolute;
background-color: red;
width: 100px;
height: 100px;
z-index: -1;
}
.test-inline-grid-overlapping-green {
display: inline-grid;
background-color: green;
width: 50px;
height: 100px;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="reference-overlapped-red"></div>
<div class="test-inline-grid-overlapping-green"></div><div class="test-inline-grid-overlapping-green"></div>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: '::first-letter' from grid container does not apply to grid items</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="help" href="http://www.w3.org/TR/css3-selectors/#first-letter" title="7.2. The ::first-letter pseudo-element">
<link rel="match" href="../reference/grid-text-green-margin-no-collapse-ref.html">
<meta name="assert" content="This test checks that '::first-letter' pseudo-element is ignored in grid items when applied to a grid container.">
<style>
.grid {
display: grid;
color: green;
}
.grid::first-letter {
color: red;
}
</style>
<div class="grid">
<div>
<p>This text should be <strong>green</strong> and body and paragraph margins should <strong>not collapse</strong>.</p>
</div>
</div>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: '::first-letter' from grid container ancestors does not apply to grid items</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="help" href="http://www.w3.org/TR/css3-selectors/#first-letter" title="7.2. The ::first-letter pseudo-element">
<link rel="match" href="../reference/grid-text-green-margin-no-collapse-ref.html">
<meta name="assert" content="This test checks that '::first-letter' pseudo-element is ignored in grid items when applied to a grid container ancestors.">
<style>
.grid {
display: grid;
color: green;
}
body::first-letter {
color: red;
}
</style>
<div class="grid">
<div>
<p>This text should be <strong>green</strong> and body and paragraph margins should <strong>not collapse</strong>.</p>
</div>
</div>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: '::first-letter' works on grid items</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="help" href="http://www.w3.org/TR/css3-selectors/#first-letter" title="7.2. The ::first-letter pseudo-element">
<link rel="match" href="../reference/grid-first-letter-green-margin-no-collapse-ref.html">
<meta name="assert" content="This test checks that '::first-letter' pseudo-element works as expected if it is applied directly to a grid item.">
<style>
.grid {
display: grid;
}
.item::first-letter {
color: green;
}
</style>
<div class="grid">
<div class="item">
<p>
The <strong>first letter</strong> of this paragraph, and only that one, should be <strong>green</strong>.
In addition, body and paragraph margins should <strong>not collapse</strong>.
</p>
</div>
</div>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: '::first-line' from grid container does not apply to grid items</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="help" href="http://www.w3.org/TR/css3-selectors/#first-formatted-line" title="7.1.1. First formatted line definition in CSS">
<link rel="match" href="../reference/grid-text-green-margin-no-collapse-ref.html">
<meta name="assert" content="This test checks that '::first-line' pseudo-element is ignored in grid items when applied to a grid container.">
<style>
.grid {
display: grid;
color: green;
}
.grid::first-line {
color: red;
}
</style>
<div class="grid">
<div>
<p>This text should be <strong>green</strong> and body and paragraph margins should <strong>not collapse</strong>.</p>
</div>
</div>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: '::first-line' from grid container ancestors does not apply to grid items</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="help" href="http://www.w3.org/TR/css3-selectors/#first-formatted-line" title="7.1.1. First formatted line definition in CSS">
<link rel="match" href="../reference/grid-text-green-margin-no-collapse-ref.html">
<meta name="assert" content="This test checks that '::first-line' pseudo-element is ignored in grid items when applied to a grid container ancestors.">
<style>
.grid {
display: grid;
color: green;
}
body::first-line {
color: red;
}
</style>
<div class="grid">
<div>
<p>This text should be <strong>green</strong> and body and paragraph margins should <strong>not collapse</strong>.</p>
</div>
</div>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: '::first-line' works on grid items</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="help" href="http://www.w3.org/TR/css3-selectors/#first-formatted-line" title="7.1.1. First formatted line definition in CSS">
<link rel="match" href="../reference/grid-text-green-margin-no-collapse-ref.html">
<meta name="assert" content="This test checks that '::first-line' pseudo-element works as expected if it is applied directly to a grid item.">
<style>
.grid {
display: grid;
color: red;
}
.item::first-line {
color: green;
}
</style>
<div class="grid">
<div class="item">
<p>This text should be <strong>green</strong> and body and paragraph margins should <strong>not collapse</strong>.</p>
</div>
</div>

View file

@ -0,0 +1,39 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: 'float' has no effect on grid items</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <!-- 2015-01-03 -->
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#float-position" title="9.5.1 Positioning the float">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<style>
#reference-overlapped-red {
position: absolute;
background-color: red;
width: 100px;
height: 100px;
z-index: -1;
}
.grid {
display: grid;
}
.test-overlapping-green {
background-color: green;
width: 100px;
height: 50px;
}
.float-left {
float: left;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="reference-overlapped-red"></div>
<div class="grid">
<div class="test-overlapping-green float-left"></div>
<div class="test-overlapping-green"></div>
</div>

View file

@ -0,0 +1,35 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: floats do not intrude into a grid</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<style>
#reference-overlapped-red {
position: absolute;
background-color: red;
width: 100px;
height: 100px;
z-index: -1;
}
.test-overlapping-green {
background-color: green;
width: 50px;
height: 100px;
}
.float {
float: left;
}
.grid {
display: grid;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="reference-overlapped-red"></div>
<div class="float test-overlapping-green"></div>
<div class="grid test-overlapping-green"></div>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: '::first-letter' from inline grid container does not apply to grid items</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="help" href="http://www.w3.org/TR/css3-selectors/#first-letter" title="7.2. The ::first-letter pseudo-element">
<link rel="match" href="../reference/grid-text-green-margin-no-collapse-ref.html">
<meta name="assert" content="This test checks that '::first-letter' pseudo-element is ignored in grid items when applied to an inline grid container.">
<style>
.inline-grid {
display: inline-grid;
color: green;
}
.grid::first-letter {
color: red;
}
</style>
<div class="inline-grid">
<div>
<p>This text should be <strong>green</strong> and body and paragraph margins should <strong>not collapse</strong>.</p>
</div>
</div>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: '::first-letter' from inline grid container ancestors does not apply to grid items</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="help" href="http://www.w3.org/TR/css3-selectors/#first-letter" title="7.2. The ::first-letter pseudo-element">
<link rel="match" href="../reference/grid-text-green-margin-no-collapse-ref.html">
<meta name="assert" content="This test checks that '::first-letter' pseudo-element is ignored in grid items when applied to an inline grid container ancestors.">
<style>
.inline-grid {
display: inline-grid;
color: green;
}
body::first-letter {
color: red;
}
</style>
<div class="inline-grid">
<div>
<p>This text should be <strong>green</strong> and body and paragraph margins should <strong>not collapse</strong>.</p>
</div>
</div>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: '::first-letter' works on grid items within an inline grid</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="help" href="http://www.w3.org/TR/css3-selectors/#first-letter" title="7.2. The ::first-letter pseudo-element">
<link rel="match" href="../reference/grid-first-letter-green-margin-no-collapse-ref.html">
<meta name="assert" content="This test checks that '::first-letter' pseudo-element works as expected if it is applied directly to a grid item within an inline grid.">
<style>
.inline-grid {
display: inline-grid;
}
.item::first-letter {
color: green;
}
</style>
<div class="inline-grid">
<div class="item">
<p>
The <strong>first letter</strong> of this paragraph, and only that one, should be <strong>green</strong>.
In addition, body and paragraph margins should <strong>not collapse</strong>.
</p>
</div>
</div>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: '::first-line' from inline grid container does not apply to grid items</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="help" href="http://www.w3.org/TR/css3-selectors/#first-formatted-line" title="7.1.1. First formatted line definition in CSS">
<link rel="match" href="../reference/grid-text-green-margin-no-collapse-ref.html">
<meta name="assert" content="This test checks that '::first-line' pseudo-element is ignored in grid items when applied to an inline grid container.">
<style>
.inline-grid {
display: inline-grid;
color: green;
}
.inline-grid::first-line {
color: red;
}
</style>
<div class="inline-grid">
<div>
<p>This text should be <strong>green</strong> and body and paragraph margins should <strong>not collapse</strong>.</p>
</div>
</div>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: '::first-line' from inline grid container ancestors does not apply to grid items</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="help" href="http://www.w3.org/TR/css3-selectors/#first-formatted-line" title="7.1.1. First formatted line definition in CSS">
<link rel="match" href="../reference/grid-text-green-margin-no-collapse-ref.html">
<meta name="assert" content="This test checks that '::first-line' pseudo-element is ignored in anonymous grid items when applied to an inline grid container ancestors.">
<style>
.inline-grid {
display: inline-grid;
color: green;
}
body::first-line {
color: red;
}
</style>
<div class="inline-grid">
<div>
<p>This text should be <strong>green</strong> and body and paragraph margins should <strong>not collapse</strong>.</p>
</div>
</div>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: '::first-line' works on grid items within an inline grid</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="help" href="http://www.w3.org/TR/css3-selectors/#first-formatted-line" title="7.1.1. First formatted line definition in CSS">
<link rel="match" href="../reference/grid-text-green-margin-no-collapse-ref.html">
<meta name="assert" content="This test checks that '::first-line' pseudo-element works as expected if it is applied directly to a grid item within an inline grid.">
<style>
.inline-grid {
display: inline-grid;
color: red;
}
.item::first-line {
color: green;
}
</style>
<div class="inline-grid">
<div class="item">
<p>This text should be <strong>green</strong> and body and paragraph margins should <strong>not collapse</strong>.</p>
</div>
</div>

View file

@ -0,0 +1,39 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: 'float' has no effect on grid items within an inline grid</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <!-- 2015-01-03 -->
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#float-position" title="9.5.1 Positioning the float">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<style>
#reference-overlapped-red {
position: absolute;
background-color: red;
width: 100px;
height: 100px;
z-index: -1;
}
.inline-grid {
display: inline-grid;
}
.test-overlapping-green {
background-color: green;
width: 100px;
height: 50px;
}
.float-left {
float: left;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="reference-overlapped-red"></div>
<div class="inline-grid">
<div class="test-overlapping-green float-left"></div>
<div class="test-overlapping-green"></div>
</div>

View file

@ -0,0 +1,35 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: floats do not intrude into an inline grid</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<style>
#reference-overlapped-red {
position: absolute;
background-color: red;
width: 100px;
height: 100px;
z-index: -1;
}
.test-overlapping-green {
background-color: green;
width: 50px;
height: 100px;
}
.float {
float: left;
}
.inline-grid {
display: inline-grid;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="reference-overlapped-red"></div>
<div class="float test-overlapping-green"></div>
<div class="inline-grid test-overlapping-green"></div>

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: inline grid's margins do not collapse</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="match" href="../reference/grid-text-green-margin-no-collapse-ref.html">
<meta name="assert" content="This test checks that inline grid's margin (body) do not collapse with the marings of the grid item (a paragraph).">
<style>
body {
display: inline-grid;
}
p {
color: green;
}
</style>
<p>This text should be <strong>green</strong> and body and paragraph margins should <strong>not collapse</strong>.</p>

View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: 'column-*' properties from inline grid container does not apply to grid items</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<meta name="assert" content="This test checks that 'column-*' properties in the Multicol module are ignored in grid items when applied to an inline grid container.">
<style>
#reference-overlapped-red {
position: absolute;
background-color: red;
width: 100px;
height: 100px;
z-index: -1;
}
.test-overlapping-green {
background-color: green;
width: 100px;
height: 50px;
}
.inline-grid {
display: inline-grid;
column-width: 50px;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="reference-overlapped-red"></div>
<div class="inline-grid">
<div class="test-overlapping-green"></div>
<div class="test-overlapping-green"></div>
</div>

View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: 'vertical-align' has no effect on grid items within an inline grid</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <!-- 2014-12-10 -->
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align" title="10.8.1 Leading and half-leading">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<meta name="flags" content="ahem">
<style>
#reference-overlapped-red {
position: absolute;
background-color: red;
width: 100px;
height: 100px;
z-index: -1;
}
#test-inline-grid-overlapping-green {
display: inline-grid;
font: 50px/1 Ahem;
color: green;
}
#vertical-align {
vertical-align: 125px;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="reference-overlapped-red"></div>
<div id="test-inline-grid-overlapping-green">
<span>1s</span>
<span id="vertical-align">2n</span>
</div>

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: grid's margins do not collapse</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="match" href="../reference/grid-text-green-margin-no-collapse-ref.html">
<meta name="assert" content="This test checks that grid's margin (body) do not collapse with the marings of the grid item (a paragraph).">
<style>
body {
display: grid;
}
p {
color: green;
}
</style>
<p>This text should be <strong>green</strong> and body and paragraph margins should <strong>not collapse</strong>.</p>

View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: 'column-*' properties from grid container does not apply to grid items</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="help" href="http://www.w3.org/TR/css3-multicol/#the-number-and-width-of-columns" title="3. The number and width of columns">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<meta name="assert" content="This test checks that 'column-*' properties in the Multicol module are ignored in grid items when applied to a grid container.">
<style>
#reference-overlapped-red {
position: absolute;
background-color: red;
width: 100px;
height: 100px;
z-index: -1;
}
.test-overlapping-green {
background-color: green;
width: 100px;
height: 50px;
}
.grid {
display: grid;
column-width: 50px;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="reference-overlapped-red"></div>
<div class="grid">
<div class="test-overlapping-green"></div>
<div class="test-overlapping-green"></div>
</div>

View file

@ -0,0 +1,75 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: DOM support for 'grid' and 'inline-grid' 'display' values</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <!-- 2014-11-18 -->
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<meta name="flags" content="dom">
<meta name="assert" content="This test checks that 'grid' and 'inline-grid' values for 'display' property are supported so that DOM methods, specifically getComputedValue(), and its associated CSS2Properties interface, can fetch such 'display' values.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
.grid {
display: grid;
}
.inline-grid {
display: inline-grid;
}
</style>
<div id="log"></div>
<div id="style-grid" style="display: grid;"></div>
<div id="style-inline-grid" style="display: inline-grid;"></div>
<div id="css-grid" class="grid"></div>
<div id="css-inline-grid" class="inline-grid"></div>
<div id="js-grid"></div>
<div id="js-inline-grid"></div>
<script>
function testStyleDisplay(element, value) {
assert_equals(element.style.display, value, "Style display should be '" + value + "'");
}
function testComputedStyleDisplay(element, value) {
assert_equals(getComputedStyle(element).getPropertyValue("display"), value, "getComputedStyle() display should be '" + value + "'");
}
var styleGrid = document.getElementById("style-grid");
test(function() {
testStyleDisplay(styleGrid, "grid");
testComputedStyleDisplay(styleGrid, "grid");
}, "Test style display 'grid'");
var styleInlineGrid = document.getElementById("style-inline-grid");
test(function() {
testStyleDisplay(styleInlineGrid, "inline-grid");
testComputedStyleDisplay(styleInlineGrid, "inline-grid");
}, "Test style display 'inline-grid'");
var cssGrid = document.getElementById("css-grid");
test(function() {
testComputedStyleDisplay(cssGrid, "grid");
}, "Test CSS display 'grid'");
var cssInlineGrid = document.getElementById("css-inline-grid");
test(function() {
testComputedStyleDisplay(cssInlineGrid, "inline-grid");
}, "Test CSS display 'inline-grid'");
var jsGrid = document.getElementById("js-grid");
jsGrid.style.display = "grid";
test(function() {
testStyleDisplay(jsGrid, "grid");
testComputedStyleDisplay(jsGrid, "grid");
}, "Test JavaScript display 'grid'");
var jsInlineGrid = document.getElementById("js-inline-grid");
jsInlineGrid.style.display = "inline-grid";
test(function() {
testStyleDisplay(jsInlineGrid, "inline-grid");
testComputedStyleDisplay(jsInlineGrid, "inline-grid");
}, "Test JavaScript display 'inline-grid'");
</script>

View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: 'vertical-align' has no effect on grid items</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <!-- 2014-12-10 -->
<link rel="help" href="http://www.w3.org/TR/css-grid-1/#grid-containers" title="3.1 Establishing Grid Containers">
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align" title="10.8.1 Leading and half-leading">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<meta name="flags" content="ahem">
<style>
#reference-overlapped-red {
position: absolute;
background-color: red;
width: 100px;
height: 100px;
z-index: -1;
}
#test-grid-overlapping-green {
display: grid;
font: 50px/1 Ahem;
color: green;
}
#vertical-align {
vertical-align: 125px;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="reference-overlapped-red"></div>
<div id="test-grid-overlapping-green">
<span>1s</span>
<span id="vertical-align">2n</span>
</div>