This repository has been archived by the owner on Dec 18, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 325
New tests for CSS2 corresponding to the changes introduced by CSS 2.2 #1139
Closed
Closed
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
d78c641
Tests for two errata for CSS 2.1.
bert-github f2c1de4
Merge remote-tracking branch 'upstream/master'
bert-github 3ca3e12
Signs (+ or -) may precede numbers, but wihout intervening space or c…
bert-github 4a13010
Added test for computed height in presence of min-height and max-height
bert-github b7db41d
Testing that overflow applies to elements that establish a formatting…
bert-github 2ce0160
Testing escapes in URI tokens
bert-github 0bd20ab
testing control characters in identifiers
bert-github 3e18256
Testing that BOM overrides a UTF charset
bert-github b3c4cf4
testing height inherited as a percentage
bert-github ccde56c
Testing scientific notation
bert-github f1c22da
Testing that an element creates an inline formatting context.
bert-github c90c4c4
Select container by ID
bert-github 65d5964
Just changing file permission bits
bert-github 76f0e94
testing that fixex positioning makes a stacking context.
bert-github ef03ae1
Testing parsing errors involving the incorrect start of a declaration.
bert-github 356c677
Corrected metadata.
bert-github e7be31f
Merge https://github.com/w3c/csswg-test
bert-github 9352871
Removed help/match/assert tags that should not be in Reference Files
bert-github e98d808
Fixes in response to Geoffrey Sneddon's review, see https://github.co…
bert-github d031e72
Fixes in response to Geoffrey Sneddon's review, see https://github.co…
bert-github 54e287a
Merge https://github.com/w3c/csswg-test
bert-github 8aff98c
Point to /TR/CSS22 instead of /TR/CSS2
bert-github 8f4f309
Point to /TR/CSS22 instead of /TR/CSS2
bert-github 0701f4b
Point to /TR/CSS22 instead of /TR/CSS2
bert-github 4eb0ef9
Point to /TR/CSS22 instead of /TR/CSS2
bert-github 112e7cb
Point to /TR/CSS22 instead of /TR/CSS2
bert-github a272e01
Point to /TR/CSS22 instead of /TR/CSS2
bert-github e1798ef
Removed link headers that should not be in reference files.
bert-github 7a4c19c
Merge https://github.com/w3c/csswg-test
bert-github 15fb17d
Added an extra rel=help link, to the Changes section of CSS 2.2
bert-github File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>CSS Reference File</title> | ||
<link rel="author" title="Bert Bos" href="mailto:bert@w3.org"> | ||
|
||
<style> | ||
p {font-size: larger} | ||
p, em {border: medium solid} | ||
</style> | ||
|
||
<p>This line is all <span>in one font</span> size | ||
<em></em> and there is no red. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>CSS cascading: Inherit the computed value</title> | ||
<link rel="help" href="http://www.w3.org/TR/CSS22/cascade.html#value-def-inherit"> | ||
<link rel="help" href="http://www.w3.org/TR/CSS22/changes.html#s.6.2.1"> | ||
<meta name="assert" content="Each property may also have a cascaded value of 'inherit', which means that, for a given element, the property takes as specified value the computed value of the element's parent."> | ||
<link rel="match" href="inherit-computed-001-ref.html"> | ||
<link rel="author" title="Bert Bos" href="mailto:bert@w3.org"> | ||
|
||
<style> | ||
p {font-size: larger; border: medium solid} | ||
span {font-size: inherit} | ||
em {color: red; border: inherit} | ||
</style> | ||
|
||
<p>This line is all <span>in one font</span> size | ||
<em></em> and there is no red. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>CSS Reference File</title> | ||
<link rel="author" title="Bert Bos" href="mailto:bert@w3.org"> | ||
|
||
<style> | ||
div {border-width: 1em; border-style: solid; padding: 0.5em} | ||
p {font-size: 2em; border-width: 0.5em; border-style: solid} | ||
</style> | ||
|
||
<div><p>All borders are the same thickness.</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>CSS cascading: Inherit the computed value</title> | ||
<link rel="help" href="http://www.w3.org/TR/CSS22/cascade.html#value-def-inherit"> | ||
<link rel="help" href="http://www.w3.org/TR/CSS22/changes.html#s.6.2.1"> | ||
<meta name="assert" content="Each property may also have a cascaded value of 'inherit', which means that, for a given element, the property takes as specified value the computed value of the element's parent."> | ||
<link rel="match" href="inherit-computed-002-ref.html"> | ||
<link rel="author" title="Bert Bos" href="mailto:bert@w3.org"> | ||
|
||
<style> | ||
div {border-width: 1em; border-style: solid; padding: 0.5em} | ||
p {font-size: 2em; border-width: inherit; border-style: solid} | ||
</style> | ||
|
||
<div><p>All borders are the same thickness.</div> |
Empty file.
Empty file.
Empty file.
Empty file.
17 changes: 17 additions & 0 deletions
17
css21/margin-padding-clear/margin-collapse-min-height-001-ref.xht
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!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 Reference File</title> | ||
<link rel="author" title="Bert Bos" href="mailto:bert@w3.org" /> | ||
<style type="text/css"> | ||
body {min-width: 17em} | ||
div.parent {height: 2em; margin: 5em 0 1em 0} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="parent"> | ||
There's more space above this line than between this line and the horizontal rule | ||
</div> | ||
<hr /> | ||
</body> | ||
</html> |
27 changes: 27 additions & 0 deletions
27
css21/margin-padding-clear/margin-collapse-min-height-001.xht
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!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 margin: Margin collapsing and elements with min-height</title> | ||
<link rel="author" title="Bert Bos" href="mailto:bert@w3.org" /> | ||
<link rel="help" href="http://www.w3.org/TR/CSS22/box.html#collapsing-margins" /> | ||
<link rel="help" href="http://www.w3.org/TR/CSS22/changes.html#s.8.3.1c" /> | ||
<link rel="match" href="margin-collapse-min-height-001-ref.xht" /> | ||
<meta name="assert" content="If the top margin of a box with non-zero computed 'min-height' and 'auto' computed 'height' collapses with the bottom margin of its last in-flow child, then the child's bottom margin does not collapse with the parent's bottom margin." /> | ||
<style type="text/css"> | ||
body {min-width: 17em} | ||
div.parent {min-height: 2em; height: auto; margin: 1em 0} | ||
div.last-child {margin-bottom: 5em} | ||
div.float {float: left} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="parent"> | ||
<div></div> | ||
<div></div> | ||
<div class="last-child"> | ||
<div class="float">There's more space above this line than between this line and the horizontal rule</div> | ||
</div> | ||
</div> | ||
<hr /> | ||
</body> | ||
</html> |
22 changes: 22 additions & 0 deletions
22
css21/margin-padding-clear/margin-collapse-min-height-002-ref.xht
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 margin: Margin collapsing and elements with min-height</title> | ||
<link rel="author" title="Bert Bos" href="mailto:bert@w3.org" /> | ||
<style type="text/css"> | ||
#container {width: 50px; border-top: 1px solid transparent; | ||
background: green} | ||
#parent {height: 50px; background-color: white; margin-top: 50px} | ||
#following-sibling {height: 50px; background-color: green} | ||
</style> | ||
</head> | ||
<body> | ||
<p>There should be two solid green squares and no red on this page</p> | ||
|
||
<div id="container" > | ||
<div id="parent"> | ||
</div> | ||
<div id="following-sibling"></div> | ||
</div> | ||
</body> | ||
</html> |
29 changes: 29 additions & 0 deletions
29
css21/margin-padding-clear/margin-collapse-min-height-002.xht
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!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 margin: Margin collapsing and elements with min-height</title> | ||
<link rel="author" title="Bert Bos" href="mailto:bert@w3.org" /> | ||
<link rel="help" href="http://www.w3.org/TR/CSS22/box.html#collapsing-margins" /> | ||
<link rel="help" href="http://www.w3.org/TR/CSS22/changes.html#s.8.3.1c" /> | ||
<link rel="match" href="margin-collapse-min-height-002-ref.xht" /> | ||
<meta name="assert" content="If the top margin of a box with non-zero computed 'min-height' and 'auto' computed 'height' collapses with the bottom margin of its last in-flow child, then the child's bottom margin does not collapse with the parent's bottom margin." /> | ||
<style type="text/css"> | ||
#container {width: 50px; height: 50px; border-top: 1px solid transparent; | ||
border-bottom: 100px solid red; background: green} | ||
#parent {height: auto; min-height: 50px; background-color: white} | ||
#child {margin-bottom: 50px} | ||
#following-sibling {height: 50px; background-color: green} | ||
</style> | ||
</head> | ||
<body> | ||
<!-- Credit for this test goes to Anton Prowse, see | ||
https://www.w3.org/Bugs/Public/show_bug.cgi?id=16036#c4 --> | ||
<p>There should be two solid green squares and no red on this page</p> | ||
<div id="container" > | ||
<div id="parent"> | ||
<div id="child"></div> | ||
</div> | ||
<div id="following-sibling"></div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="us-ascii"?> | ||
<!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" lang="en"> | ||
<head> | ||
<title>CSS Test: Stylesheet encodings UTF with a BOM override</title> | ||
<link rel="author" title="Bert Bos" href="mailto:bert@w3.org"/> | ||
<style type="text/css"> | ||
p { color: white; background: green; } | ||
</style> | ||
</head> | ||
<body> | ||
<p class="test">This line should be green.</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="us-ascii"?> | ||
<!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" lang="en"> | ||
<head> | ||
<title>CSS Test: Stylesheet encodings UTF with a BOM override</title> | ||
<link rel="help" href="http://www.w3.org/TR/CSS22/syndata.html#charset" /> | ||
<link rel="help" href="http://www.w3.org/TR/CSS22/changes.html#s.4.4" /> | ||
<link rel="match" href="character-encoding-041-ref.xht" /> | ||
<meta content="http" name="flags" /> | ||
<meta name="assert" content='If rule 1 above (an HTTP "charset" parameter or similar) yields a character encoding and it is one of UTF-8, UTF-16 or UTF-32, then a BOM, if any, at the start of the file overrides that character encoding, as follows: [...]'/> | ||
<link rel="author" title="Bert Bos" href="mailto:bert@w3.org"/> | ||
<style type="text/css"> | ||
p { color: white; background: red; } | ||
</style> | ||
<link rel="stylesheet" href="support/character-encoding-041.css"/> | ||
</head> | ||
<body> | ||
<p class="tést">This line should be green.</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!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 Test: Valid control characters in identifiers</title> | ||
|
||
<link rel="author" title="Bert Bos" href="mailto:bert@w3.org/" /> | ||
|
||
<style type="text/css"> | ||
div p::before {content: counter(item, lower-latin) ". "} | ||
div p {counter-increment: item} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<p>The next items should be numbered a to f.</p> | ||
<div> | ||
<p>Item</p> | ||
<p>Item</p> | ||
<p>Item</p> | ||
<p>Item</p> | ||
<p>Item</p> | ||
<p>Item</p> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!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 Test: Valid control characters in identifiers</title> | ||
|
||
<link rel="help" href="http://www.w3.org/TR/CSS22/syndata.html#characters" /> | ||
<link rel="help" href="http://www.w3.org/TR/CSS22/changes.html#s.4.1.3d" /> | ||
<link rel="match" href="characters-0080-009F-001-ref.xht" /> | ||
<meta name="assert" content="identifiers [...] can contain only the characters [a-zA-Z0-9] and ISO 10646 characters U+0080 and higher, [...]" /> | ||
<link rel="author" title="Bert Bos" href="mailto:bert@w3.org/" /> | ||
|
||
<style type="text/css"> | ||
/* Warning: the next lines contain control characters \201..\237 */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given this is XHTML and not HTML, can we not just use character references for them? |
||
div p::before {content: counter(item) ". "} | ||
div p::before {content: counter(, lower-latin) ". "} | ||
div p {counter-increment: } | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<p>The next items should be numbered a to f.</p> | ||
<div> | ||
<p>Item</p> | ||
<p>Item</p> | ||
<p>Item</p> | ||
<p>Item</p> | ||
<p>Item</p> | ||
<p>Item</p> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!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 Test: Escapes in a URI token</title> | ||
|
||
<link rel="author" title="Bert Bos" href="mailto:bert@w3.org/" /> | ||
|
||
<style type="text/css"> | ||
div {width: 5em; height: 1em; background: url(support/1x1-green.png)} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<p>There should be no red.</p> | ||
<div id="div0"></div> | ||
<div id="div1"></div> | ||
<div id="div2"></div> | ||
<div id="div3"></div> | ||
<div id="div4"></div> | ||
<div id="div5"></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!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 Test: Escapes in a URI token</title> | ||
|
||
<link rel="help" href="http://www.w3.org/TR/CSS22/syndata.html#tokenization" /> | ||
<link rel="help" href="http://www.w3.org/TR/CSS22/changes.html#s.4.1.1a" /> | ||
<link rel="match" href="escaped-url-001-ref.xht" /> | ||
<meta name="assert" content="URI {U}{R}{L}\({w}{string}{w}\)| | ||
{U}{R}{L}\({w}([!#$%&*-\[\]-~]|{nonascii}|{escape})*{w}\)" /> | ||
<link rel="author" title="Bert Bos" href="mailto:bert@w3.org/" /> | ||
|
||
<style type="text/css"> | ||
div {background: red; width: 5em; height: 1em} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. uri-015 tests much of this already, though not with the variation in case. |
||
#div0 {background: url(support/1x1-green.png)} | ||
#div1 {background: \url(support/1x1-green.png)} | ||
#div2 {background: U\Rl(support/1x1-green.png)} | ||
#div3 {background: U\R\l(support/1x1-green.png)} | ||
#div4 {background: \55Rl(support/1x1-green.png)} | ||
#div5 {background: \000075 rl(support/1x1-green.png)} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<p>There should be no red.</p> | ||
<div id="div0"></div> | ||
<div id="div1"></div> | ||
<div id="div2"></div> | ||
<div id="div3"></div> | ||
<div id="div4"></div> | ||
<div id="div5"></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 Reference File</title> | ||
<link rel="author" title="Bert Bos" href="mailto:bert@w3.org" /> | ||
|
||
<style type="text/css"> | ||
body {background: white; color: green} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<p id="p1">This text must be green.</p> | ||
<p id="p2">This text must be green.</p> | ||
<p id="p3">This text must be green.</p> | ||
<p id="p4">This text must be green.</p> | ||
<p id="p5">This text must be green.</p> | ||
<p id="p6">This text must be green.</p> | ||
<p id="p7">This text must be green.</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!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 Test: Parsing malformed declaration blocks</title> | ||
<link rel="help" href="http://www.w3.org/TR/CSS22/syndata.html#parsing-errors" /> | ||
<link rel="help" href="http://www.w3.org/TR/CSS22/changes.html#s.4.1.1e" /> | ||
<link rel="match" href="malformed-decl-block-001-ref.xht"/> | ||
<meta name="flags" content="invalid" /> | ||
<meta name="assert" content="When the UA expects the start of a declaration or at-rule (i.e., an IDENT token or an ATKEYWORD token) but finds an unexpected token instead, that token is considered to be the first token of a malformed declaration. I.e., the rule for malformed declarations, rather than malformed statements is used to determine which tokens to ignore in that case." /> | ||
<link rel="author" title="Bert Bos" href="mailto:bert@w3.org" /> | ||
|
||
<style type="text/css"> | ||
body {background: white; color: red} | ||
#p1 {color: green} | ||
#p2 {@charset utf-8; color: green} | ||
#p3 {@foo {color: red} color: green} | ||
#p4 {12; color: green} | ||
#p5 {color: green; 12 color: red} | ||
#p6 {color: green; 12 @page {color: red} color: red} | ||
#p7 {@foo {color: red}; color: green} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<p id="p1">This text must be green.</p> | ||
<p id="p2">This text must be green.</p> | ||
<p id="p3">This text must be green.</p> | ||
<p id="p4">This text must be green.</p> | ||
<p id="p5">This text must be green.</p> | ||
<p id="p6">This text must be green.</p> | ||
<p id="p7">This text must be green.</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!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 Reference File</title> | ||
<link rel="author" title="Bert Bos" href="mailto:bert@w3.org" /> | ||
|
||
<style type="text/css"> | ||
#container {height: 2em; background: red} | ||
#child1 {height: 1em; background: green} | ||
#child2 {height: 1em; background: green} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<p>There should be no red.</p> | ||
|
||
<div id="container"> | ||
<div id="child1"></div> | ||
<div id="child2"></div> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using something that isn't
font-size
would seem better here, given if the span rule isn't applied or thefont-size: inherit
ignored this test will still pass. Seems much better to use a property that isn't inherited by default (border or display, maybe?).