Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Reference tests for display:contents #1129

Merged
merged 4 commits into from Oct 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions css-display-3/display-contents-before-after-001.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Display: Generated ::before and ::after on display:contents</title>
<link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com">
<link rel="help" href="https://drafts.csswg.org/css-display-3/#valdef-display-contents">
<link rel="match" href="display-contents-pass-ref.html">
<style>
div { display: contents }
.p::before { content: "P" }
.a::before { content: "A" }
.s::after { content: "S" }
</style>
<p>You should see the word PASS below.</p>
<div><!--
--><div><div class="p"></div></div><!--
--><div></div><!--
--><div class="a"></div><!--
--><div>S<div class="s"></div></div>
</div>
18 changes: 18 additions & 0 deletions css-display-3/display-contents-before-after-002.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Display: Generated ::before and ::after with display:contents</title>
<link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com">
<link rel="help" href="https://drafts.csswg.org/css-display-3/#valdef-display-contents">
<link rel="match" href="display-contents-pass-ref.html">
<style>
div::before {
display: contents;
content: "P"
}
div::after {
display: contents;
content: "S"
}
</style>
<p>You should see the word PASS below.</p>
<div>AS</div>
18 changes: 18 additions & 0 deletions css-display-3/display-contents-block-001.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Display: display:contents in block layout</title>
<link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com">
<link rel="help" href="https://drafts.csswg.org/css-display-3/#valdef-display-contents">
<link rel="match" href="display-contents-pass-no-red-ref.html">
<style>
#contents {
display: contents;
border: 10px solid red
}
</style>
<p>You should see the word PASS and no red below.</p>
<div>
<div id="contents">
<div id="inner">PASS</div>
</div>
</div>
6 changes: 6 additions & 0 deletions css-display-3/display-contents-block-002-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reftest Reference</title>
<link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com">
<p>You should see the word PASS with a 300px top margin below.</p>
<div style="margin-top: 300px">PASS</div>
20 changes: 20 additions & 0 deletions css-display-3/display-contents-block-002.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Display: margin collapsing through display:contents</title>
<link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com">
<link rel="help" href="https://drafts.csswg.org/css-display-3/#valdef-display-contents">
<link rel="match" href="display-contents-block-002-ref.html">
<style>
#outer { margin-top: 100px }
#inner { margin-top: 300px }
#contents {
display: contents;
margin-top: 2000px
}
</style>
<p>You should see the word PASS with a 300px top margin below.</p>
<div id="outer">
<div id="contents">
<div id="inner">PASS</div>
</div>
</div>
17 changes: 17 additions & 0 deletions css-display-3/display-contents-first-letter-001.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Display: display:contents and ::first-letter</title>
<link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com">
<link rel="help" href="https://drafts.csswg.org/css-display-3/#valdef-display-contents">
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#first-letter-pseudo">
<link rel="match" href="display-contents-pass-green-no-red-ref.html">
<style>
#contents { display: contents }
#contents::first-letter { background-color: red }
#container::first-letter { color: green }
span { color: green }
</style>
<p>You should see the word PASS in green and no red below.</p>
<div id="container">
<div id="contents">P<span>ASS</span></div>
</div>
16 changes: 16 additions & 0 deletions css-display-3/display-contents-first-line-001.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Display: display:contents and ::first-line</title>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This test seems to fail in Gecko, though that seems like a bug in Gecko. Filed https://bugzilla.mozilla.org/show_bug.cgi?id=1305951 )

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

<link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com">
<link rel="help" href="https://drafts.csswg.org/css-display-3/#valdef-display-contents">
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#first-line-pseudo">
<link rel="match" href="display-contents-pass-green-no-red-ref.html">
<style>
#contents { display: contents }
#contents::first-line { background-color: red }
#container::first-line { color: green }
</style>
<p>You should see the word PASS in green and no red below.</p>
<div id="container">
<div id="contents">PASS</div>
</div>
16 changes: 16 additions & 0 deletions css-display-3/display-contents-inline-001.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Display: display:contents in inline layout</title>
<link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com">
<link rel="help" href="https://drafts.csswg.org/css-display-3/#valdef-display-contents">
<link rel="match" href="display-contents-pass-no-red-ref.html">
<style>
#contents {
display: contents;
border: 10px solid red
}
</style>
<p>You should see the word PASS and no red below.</p>
<span>
P<div id="contents">AS</div>S
</span>
6 changes: 6 additions & 0 deletions css-display-3/display-contents-pass-green-no-red-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reftest Reference</title>
<link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com">
<p>You should see the word PASS in green and no red below.</p>
<div style="color:green">PASS</div>
6 changes: 6 additions & 0 deletions css-display-3/display-contents-pass-no-red-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reftest Reference</title>
<link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com">
<p>You should see the word PASS and no red below.</p>
<div>PASS</div>
6 changes: 6 additions & 0 deletions css-display-3/display-contents-pass-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reftest Reference</title>
<link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com">
<p>You should see the word PASS below.</p>
PASS
17 changes: 17 additions & 0 deletions css-display-3/display-contents-replaced-001-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reftest Reference</title>
<link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com">
<style>
button, img, input, textarea {
display: contents;
border: 10px solid green
}
</style>
<p>You should see five form inputs, and an orange image, with green border below.</p>
<button>Button</button>
<input type="text" value="text"></input>
<input type="file"></input>
<input type="password" value="password"></input>
<textarea>textarea</textarea>
<img src="support/swatch-orange.png">
19 changes: 19 additions & 0 deletions css-display-3/display-contents-replaced-001.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Display: display:contents and replaced elements</title>
<link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com">
<link rel="help" href="https://drafts.csswg.org/css-display-3/#valdef-display-contents">
<link rel="match" href="display-contents-replaced-001-ref.html">
<style>
button, img, input, textarea {
display: contents;
border: 10px solid green
}
</style>
<p>You should see five form inputs, and an orange image, with green border below.</p>
<button>Button</button>
<input type="text" value="text"></input>
<input type="file"></input>
<input type="password" value="password"></input>
<textarea>textarea</textarea>
<img src="support/swatch-orange.png">
18 changes: 18 additions & 0 deletions css-display-3/display-contents-td-001.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Display: Children of multiple td elements with display:contents wrapped in single anonymous table cell</title>
<link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com">
<link rel="help" href="https://drafts.csswg.org/css-display-3/#valdef-display-contents">
<link rel="match" href="display-contents-pass-ref.html">
<style>
td {
display: contents;
padding-right: 3em
}
</style>
<p>You should see the word PASS below.</p>
<table cellpadding="0" cellspacing="0">
<tr>
<td>P</td><td>A</td><td>S</td><td>S</td>
</tr>
</table>
18 changes: 18 additions & 0 deletions css-display-3/display-contents-tr-001.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Display: td elements wrapped in single anonymous table-row with display:contents tr</title>
<link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com">
<link rel="help" href="https://drafts.csswg.org/css-display-3/#valdef-display-contents">
<link rel="match" href="display-contents-pass-ref.html">
<style>
tr { display: contents }
</style>
<p>You should see the word PASS below.</p>
<table cellpadding="0" cellspacing="0">
<tr>
<td>PA</td>
</tr>
<tr>
<td>SS</td>
</tr>
</table>
Binary file added css-display-3/support/swatch-orange.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.