Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444

This commit is contained in:
Josh Matthews 2017-04-17 12:06:02 +10:00 committed by Anthony Ramine
parent 25e8bf69e6
commit 665817d2a6
35333 changed files with 1818077 additions and 16036 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,87 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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" type="text/javascript"></script>
<script src="/resources/testharnessreport.js" type="text/javascript"></script>
<style type="text/css"><![CDATA[
#grid {
display: grid;
}
#inline-grid {
display: inline-grid;
}
.inline-table {
display: inline-table;
}
.inline {
display: inline;
}
.flex {
display: flex;
}
.float {
float: left;
}
]]></style>
</head>
<body>
<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 type="text/javascript"><![CDATA[
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>
</body>
</html>

View file

@ -0,0 +1,40 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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 type="text/css"><![CDATA[
#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>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,33 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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 type="text/css"><![CDATA[
#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>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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.xht" />
<meta name="assert" content="This test checks that '::first-letter' pseudo-element is ignored in grid items when applied to a grid container." />
<style type="text/css"><![CDATA[
.grid {
display: grid;
color: green;
}
.grid::first-letter {
color: red;
}
]]></style>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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.xht" />
<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 type="text/css"><![CDATA[
.grid {
display: grid;
color: green;
}
body::first-letter {
color: red;
}
]]></style>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,30 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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.xht" />
<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 type="text/css"><![CDATA[
.grid {
display: grid;
}
.item::first-letter {
color: green;
}
]]></style>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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.xht" />
<meta name="assert" content="This test checks that '::first-line' pseudo-element is ignored in grid items when applied to a grid container." />
<style type="text/css"><![CDATA[
.grid {
display: grid;
color: green;
}
.grid::first-line {
color: red;
}
]]></style>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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.xht" />
<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 type="text/css"><![CDATA[
.grid {
display: grid;
color: green;
}
body::first-line {
color: red;
}
]]></style>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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.xht" />
<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 type="text/css"><![CDATA[
.grid {
display: grid;
color: red;
}
.item::first-line {
color: green;
}
]]></style>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,44 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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 type="text/css"><![CDATA[
#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>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,40 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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 type="text/css"><![CDATA[
#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>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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.xht" />
<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 type="text/css"><![CDATA[
.inline-grid {
display: inline-grid;
color: green;
}
.grid::first-letter {
color: red;
}
]]></style>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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.xht" />
<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 type="text/css"><![CDATA[
.inline-grid {
display: inline-grid;
color: green;
}
body::first-letter {
color: red;
}
]]></style>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,30 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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.xht" />
<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 type="text/css"><![CDATA[
.inline-grid {
display: inline-grid;
}
.item::first-letter {
color: green;
}
]]></style>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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.xht" />
<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 type="text/css"><![CDATA[
.inline-grid {
display: inline-grid;
color: green;
}
.inline-grid::first-line {
color: red;
}
]]></style>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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.xht" />
<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 type="text/css"><![CDATA[
.inline-grid {
display: inline-grid;
color: green;
}
body::first-line {
color: red;
}
]]></style>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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.xht" />
<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 type="text/css"><![CDATA[
.inline-grid {
display: inline-grid;
color: red;
}
.item::first-line {
color: green;
}
]]></style>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,44 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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 type="text/css"><![CDATA[
#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>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,40 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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 type="text/css"><![CDATA[
#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>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,22 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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.xht" />
<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 type="text/css"><![CDATA[
body {
display: inline-grid;
}
p {
color: green;
}
]]></style>
</head>
<body>
<p>This text should be <strong>green</strong> and body and paragraph margins should <strong>not collapse</strong>.</p>
</body>
</html>

View file

@ -0,0 +1,41 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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 type="text/css"><![CDATA[
#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>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,41 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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 type="text/css"><![CDATA[
#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>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,22 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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.xht" />
<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 type="text/css"><![CDATA[
body {
display: grid;
}
p {
color: green;
}
]]></style>
</head>
<body>
<p>This text should be <strong>green</strong> and body and paragraph margins should <strong>not collapse</strong>.</p>
</body>
</html>

View file

@ -0,0 +1,41 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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 type="text/css"><![CDATA[
#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>
</head>
<body>
<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>
</body>
</html>

View file

@ -0,0 +1,80 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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" type="text/javascript"></script>
<script src="/resources/testharnessreport.js" type="text/javascript"></script>
<style type="text/css"><![CDATA[
.grid {
display: grid;
}
.inline-grid {
display: inline-grid;
}
]]></style>
</head>
<body>
<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 type="text/javascript"><![CDATA[
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>
</body>
</html>

View file

@ -0,0 +1,41 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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 type="text/css"><![CDATA[
#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>
</head>
<body>
<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>
</body>
</html>