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,21 @@
<!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: @import not as the first declaration</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html" />
<meta name="flags" content="" />
<meta name="assert" content="An @import is ignored if it is not the first statement in a style block." />
<style type="text/css">
body
{
color: green;
}
@import url("support/at-import-001.css");
</style>
</head>
<body>
<p>Test passes if there is no red visible on the page.</p>
<div>Filler Text</div>
</body>
</html>

View file

@ -0,0 +1,18 @@
<!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: Importing external stylesheets with @import</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html" />
<link rel="match" href="../reference/filler-text-below-green.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="An @import used to import external stylesheets." />
<style type="text/css">
@import url("support/at-import-002.css");
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div>Filler Text</div>
</body>
</html>

View file

@ -0,0 +1,18 @@
<!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: Importing styles using @import with a string</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html" />
<link rel="match" href="../reference/filler-text-below-green.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="An @import used with just a string is interpreted as if it had url(...) around it." />
<style type="text/css">
@import "support/at-import-002.css";
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div>Filler Text</div>
</body>
</html>

View file

@ -0,0 +1,18 @@
<!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: Media dependency on @import set to 'print'</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html" />
<link rel="match" href="../reference/no-red-filler-text-ref.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="Specifying a media-dependency of print does not apply rules to the user agent display." />
<style type="text/css">
@import url("support/at-import-004.css") print;
</style>
</head>
<body>
<p>Test passes if there is no red visible on the page.</p>
<div>Filler Text</div>
</body>
</html>

View file

@ -0,0 +1,18 @@
<!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: Media dependency on @import set to 'all'</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html" />
<link rel="match" href="../reference/filler-text-below-green.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="Specifying the media-dependency of 'all' applies to all media types including user agent display." />
<style type="text/css">
@import url("support/at-import-005.css") all;
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div>Filler Text</div>
</body>
</html>

View file

@ -0,0 +1,18 @@
<!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: Media dependency on @import set to 'screen'</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html" />
<link rel="match" href="../reference/filler-text-below-green.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="Specifying the media-dependent import rules to 'screen' applies to user agent display." />
<style type="text/css">
@import url("support/at-import-006.css") screen;
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div>Filler Text</div>
</body>
</html>

View file

@ -0,0 +1,19 @@
<!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: @import with @charset</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html" />
<link rel="match" href="../reference/filler-text-below-green.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="An @import is valid after @charset." />
<style type="text/css">
@charset "ISO-8859-1";
@import url("support/at-import-007.css");
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div>Filler Text</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 Test: @import - media-dependence</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#at-import" />
<meta content="paged" name="flags" />
<meta content="Media-dependent @import rules" name="assert" />
<style type="text/css"><![CDATA[
@import url("support/a-green.css") print;
]]></style>
</head>
<body class="a">
<p>PREREQUISITE: Switch to print preview or a paged media view of
the page.</p>
<p>Test passes if the whole text of this page is green.</p>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!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: @import following a known but invalid @rule</title>
<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#at-rules" />
<link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
<meta name="flags" content="invalid" />
<meta name="assert" content="@import is respected after known but ignored @rule." />
<style type="text/css">
@media;
@page;
@charset;
@import "support/import-green.css";
</style>
</head>
<body>
<p class="import">This text should be green.</p>
</body>
</html>

View file

@ -0,0 +1,19 @@
<!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: @import following an invalid selector</title>
<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#at-rules" />
<link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
<meta name="flags" content="invalid" />
<meta name="assert" content="@import is respected after invalid (ignored) rule set" />
<style type="text/css">
# { background: red; }
:unknownpseudo { background: red; }
@import "support/import-green.css";
</style>
</head>
<body>
<p class="import">This text should be green.</p>
</body>
</html>

View file

@ -0,0 +1,21 @@
<!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: @import following garbage</title>
<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#at-rules" />
<link rel="match" href="../reference/ref-this-text-should-be-green.xht"/>
<meta name="flags" content="invalid" />
<meta name="assert" content="@import is parsed as part of invalid ruleset
after garbage." />
<style type="text/css">
# :unknownpseudo
@import "support/import-red.css";
.import { color: red; }
p { color: green; }
</style>
</head>
<body>
<p class="import">This text should be green.</p>
</body>
</html>

View file

@ -0,0 +1,16 @@
<!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: User style sheets</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#cascade" />
<meta name="flags" content="userstyle" />
<meta name="assert" content="Normal user declarations override the default user agent style sheet." />
<style type="text/css"></style>
</head>
<body>
<p id="cascade">PREREQUISITE: The <a href="support/cascade.css">"cascade.css"</a> file is enabled as the user agent's user style sheet.</p>
<p>Test passes if the "Filler Text" below is green.</p>
<p class="cascadegreen">Filler Text</p>
</body>
</html>

View file

@ -0,0 +1,21 @@
<!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: Author stylesheets override user stylesheets</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#cascade" />
<meta name="flags" content="userstyle" />
<meta name="assert" content="Normal author declarations override normal user stylesheet declarations." />
<style type="text/css">
.cascadered
{
color: green;
}
</style>
</head>
<body>
<p id="cascade">PREREQUISITE: The <a href="support/cascade.css">"cascade.css"</a> file is enabled as the user agent's user style sheet.</p>
<p>Test passes if the "Filler Text" below is green.</p>
<div class="cascadered">Filler Text</div>
</body>
</html>

View file

@ -0,0 +1,21 @@
<!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: Author rules with !important and a user stylesheet</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#cascade" />
<meta name="flags" content="userstyle" />
<meta name="assert" content="Author rules using !important override user stylesheet rules." />
<style type="text/css">
.cascadered
{
color: green!important;
}
</style>
</head>
<body>
<p id="cascade">PREREQUISITE: The <a href="support/cascade.css">"cascade.css"</a> file is enabled as the user agent's user style sheet.</p>
<p>Test passes if the "Filler Text" below is green.</p>
<div class="cascadered">Filler Text</div>
</body>
</html>

View file

@ -0,0 +1,21 @@
<!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: User stylesheet rules using !important and normal author rules</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#cascade" />
<meta name="flags" content="userstyle" />
<meta name="assert" content="User stylesheet rules using !important override normal author rules." />
<style type="text/css">
.cascadegreenimportant
{
color: red;
}
</style>
</head>
<body>
<p id="cascade">PREREQUISITE: The <a href="support/cascade.css">"cascade.css"</a> file is enabled as the user agent's user style sheet.</p>
<p>Test passes if the "Filler Text" below is green.</p>
<div class="cascadegreenimportant">Filler Text</div>
</body>
</html>

View file

@ -0,0 +1,25 @@
<!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: Redefining rules</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#cascade" />
<link rel="match" href="../reference/filler-text-below-green.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="The latter specified rule wins when having the same specificity and weight." />
<style type="text/css">
div
{
color: red;
}
div
{
color: green;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div>Filler Text</div>
</body>
</html>

View file

@ -0,0 +1,16 @@
<!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: User style sheets and redefining rules</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#cascade" />
<meta name="flags" content="userstyle" />
<meta name="assert" content="The latter specified rule in a style sheet wins when having the same specificity and weight in user styles sheets." />
<style type="text/css"></style>
</head>
<body>
<p id="cascade">PREREQUISITE: The <a href="support/cascade.css">"cascade.css"</a> file is enabled as the user agent's user style sheet.</p>
<p>Test passes if the "Filler Text" below is green.</p>
<div class="cascadegreen cascadered">Filler Text</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 Test: Author rules local and external</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#cascade" />
<link rel="match" href="../reference/filler-text-below-green.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="Author rules in embedded stylesheets override author rules in imported stylesheets." />
<style type="text/css">
@import url("support/cascade-007.css");
div
{
color: green;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div>Filler Text</div>
</body>
</html>

View file

@ -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: Shorthand properties with !important</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#important-rules" />
<meta name="flags" content="" />
<meta name="assert" content="Shorthand properties with !important apply to all direct sub-properties." />
<style type="text/css">
div
{
border: solid green!important;
height: 1in;
}
div
{
border-top-color: red;
border-bottom-color: red;
}
</style>
</head>
<body>
<p>Test passes if there is a hollow green box below.</p>
<div></div>
</body>
</html>

View file

@ -0,0 +1,25 @@
<!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: Author rules with !important and other normal author rules</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#important-rules" />
<link rel="match" href="../reference/filler-text-below-green.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="Author rules with !important override normal author rules." />
<style type="text/css">
div
{
color: green!important;
}
div
{
color: red;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div>Filler Text</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 Reftest Reference</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<style type="text/css"><![CDATA[
div
{
color: green;
font-size: 100px;
}
]]></style>
</head>
<body>
<p>Test passes if the "X" is green.</p>
<div>X</div>
</body>
</html>

View file

@ -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: !important author rule in :first-letter pseudo-element</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="author" title="James Hopkins" href="http://idreamincode.co.uk/css21testsuite" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#important-rules" title="6.4.2 !important rules" />
<link rel="match" href="cascade-009a-ref.xht" />
<meta content="" name="flags" />
<meta content="Author rules with !important have precedence over normal author rules." name="assert" />
<style type="text/css"><![CDATA[
div {font-size: 100px;}
div:first-letter {color: green !important;}
div:first-letter {color: red;}
]]></style>
</head>
<body>
<p>Test passes if the "X" is green.</p>
<div>X</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 Reftest Reference</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<style type="text/css"><![CDATA[
div
{
color: green;
font-size: 48px;
}
]]></style>
</head>
<body>
<p>Test passes if "Text sample" is green.</p>
<div>Text sample</div>
</body>
</html>

View file

@ -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: !important author rule in :first-line pseudo-element</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="author" title="James Hopkins" href="http://idreamincode.co.uk/css21testsuite" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#important-rules" title="6.4.2 !important rules" />
<link rel="match" href="cascade-009b-ref.xht" />
<meta content="" name="flags" />
<meta content="Author rules with !important have precedence over normal author rules." name="assert" />
<style type="text/css"><![CDATA[
div {font-size: 48px;}
div:first-line {color: green !important;}
div:first-line {color: red;}
]]></style>
</head>
<body>
<p>Test passes if "Text sample" is green.</p>
<div>Text sample</div>
</body>
</html>

View file

@ -0,0 +1,21 @@
<!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: User stylesheet rules with !important and !important author rules</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#important-rules" />
<meta name="flags" content="userstyle" />
<meta name="assert" content="User stylesheet rules with !important override !important author rules." />
<style type="text/css">
.cascadegreenimportant
{
color: red!important;
}
</style>
</head>
<body>
<p id="cascade">PREREQUISITE: The <a href="support/cascade.css">"cascade.css"</a> file is enabled as the user agent's user style sheet.</p>
<p>Test passes if the "Filler Text" below is green.</p>
<div class="cascadegreenimportant">Filler Text</div>
</body>
</html>

View file

@ -0,0 +1,16 @@
<!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: User stylesheet rules with !important and normal user rules</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#important-rules" />
<meta name="flags" content="userstyle" />
<meta name="assert" content="User stylesheet rules with !important declarations override user stylesheet rules with normal declarations." />
<style type="text/css"></style>
</head>
<body>
<p id="cascade">PREREQUISITE: The <a href="support/cascade.css">"cascade.css"</a> file is enabled as the user agent's user style sheet.</p>
<p>Test passes if the "Filler Text" below is green.</p>
<div class="cascadegreenimportant cascadered">Filler Text</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 Reftest Reference</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<style type="text/css"><![CDATA[
div {color: green;}
]]></style>
</head>
<body>
<div>This text should be green.</div>
</body>
</html>

View file

@ -0,0 +1,19 @@
<!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: @import and !important</title>
<link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
<link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact" />
<link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/cascade/weight/002.html" type="text/html"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#at-import" />
<link rel="match" href="cascade-012-ref.xht" />
<style type="text/css"><![CDATA[
@import "support/cascade-012.css"; /* .test { color: green ! important; } */
.test { color: red; }
]]></style>
</head>
<body>
<div class="test">This text should be green.</div>
</body>
</html>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: cascade mechanism has precedence over inheritance - font boldness</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="author" title="James Hopkins" href="http://idreamincode.co.uk/css21testsuite" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#specified-value" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#inheritance" />
<meta content="" name="flags" />
<meta content="When determining the specified value of a property, the cascade mechanism of (user agent, author, user) style sheets has precedence. If no value results from such mechanism, then the property may inherit from its parent. In this testcase, it is presumed that b elements are specified in the user agents style sheets to embold their text content." name="assert" />
<style type="text/css"><![CDATA[
div {font-weight: normal;}
]]></style>
</head>
<body>
<p>Test passes if the sentence below is bold.</p>
<div><b>This text should be bold.</b></div>
</body>
</html>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: cascade mechanism has precedence over inheritance - font styling</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="author" title="James Hopkins" href="http://idreamincode.co.uk/css21testsuite" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#specified-value" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#inheritance" />
<meta content="" name="flags" />
<meta content="When determining the specified value of a property, the cascade mechanism of (user agent, author, user) style sheets has precedence. If no value results from such mechanism, then the property may inherit from its parent. In this testcase, it is presumed that i elements are specified in the user agents style sheets to italicize their text content." name="assert" />
<style type="text/css"><![CDATA[
div {font-style: normal;}
]]></style>
</head>
<body>
<p>Test passes if the sentence below is italic.</p>
<div><i>This text should be italic.</i></div>
</body>
</html>

View file

@ -0,0 +1,21 @@
<!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: Overriding the user agent default style sheet</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#cascade" />
<meta name="flags" content="ahem" />
<meta name="assert" content="User agent default style sheet settings can be overridden." />
<style type="text/css">
em
{
font: 1in Ahem;
font-style: normal;
}
</style>
</head>
<body>
<p>Test passes if the box below is not slanted to one side.</p>
<div><em>X</em></div>
</body>
</html>

View file

@ -0,0 +1,36 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Attribute 'align' vs. CSS 'caption-side' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'align' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
div
{
border: 1px solid black;
float: left;
}
table
{
width: 300px;
}
*
{
caption-side: bottom;
}
</style>
</head>
<body>
<p>Test passes if the word "Bottom" is centered inside the black box and is below the word "Top".</p>
<div>
<table>
<caption align="right">Bottom</caption>
<tr>
<td>Top</td>
</tr>
</table>
</div>
</body>
</html>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Attribute 'alink' vs. CSS active specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="interact" />
<meta name="assert" content="Attribute 'alink' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
*:active
{
color: green;
}
a
{
color: black;
}
</style>
</head>
<body alink="red">
<p>Test passes if the "Filler Text" below changes to green when the text is activated.</p>
<div>
<a href="#">Filler Text</a>
</div>
</body>
</html>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Attribute 'background' vs. CSS 'background' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="image" />
<meta name="assert" content="Attribute 'background' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
*
{
background: green;
}
</style>
</head>
<body background="support/red15x15.png">
<p>Test passes if the background of this page is green.</p>
</body>
</html>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Attribute 'bgcolor' vs. CSS 'background-color' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'bgcolor' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
*
{
background-color: green;
}
</style>
</head>
<body bgcolor="red">
<p>Test passes if the background of this page is green.</p>
</body>
</html>

View file

@ -0,0 +1,24 @@
<!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: Attribute 'border' vs. CSS border specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'border' has 0 specificity and is overridden by CSS." />
<style type="text/css">
*
{
border: 0 none transparent;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below has no box around it.</p>
<table border="20">
<tr>
<td>Filler Text</td>
</tr>
</table>
</body>
</html>

View file

@ -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: Attribute 'cellpadding' vs. CSS 'padding' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'cellpadding' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
html, body, p, table, tr
{
background: white;
}
*
{
background: blue;
padding: 0;
}
</style>
</head>
<body>
<p>Test passes if the blue boxes below are only large enough to fit the "Filler Text".</p>
<table cellpadding="100">
<tr>
<td>Filler Text Filler Text</td>
</tr>
<tr>
<td>Filler Text Filler Text</td>
</tr>
</table>
</body>
</html>

View file

@ -0,0 +1,31 @@
<!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: Attribute 'cellspacing' vs. CSS border-spacing specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'cellspacing' has 0 specificity and is overridden by CSS." />
<style type="text/css">
*
{
border-spacing: 0;
}
td
{
background: blue;
}
</style>
</head>
<body>
<p>Test passes if there is one blue box on the page.</p>
<table cellspacing="100" cellpadding="0">
<tr>
<td>FillerText</td>
</tr>
<tr>
<td>FillerText</td>
</tr>
</table>
</body>
</html>

View file

@ -0,0 +1,31 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Attribute 'clear' vs. CSS 'clear' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'clear' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
div div
{
background: blue;
float: left;
height: 32px;
width: 32px;
}
*
{
clear: none;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" is to the right of the blue box.</p>
<div>
<div></div>
<br clear="all" />
Filler Text
</div>
</body>
</html>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Attribute 'color' vs. CSS 'color' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<link rel="match" href="../reference/filler-text-below-green.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'color' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
p
{
color: black;
}
*
{
color: green;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<font color="red">Filler Text</font>
</body>
</html>

View file

@ -0,0 +1,36 @@
<!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: Attribute 'cols' vs CSS 'width' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'cols' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
html, body, p, br, div
{
border: none;
width: auto;
}
*
{
border: 1px solid blue;
padding: 0;
width: 100px;
}
div div
{
background: orange;
height: 20px;
width: 102px;
}
</style>
</head>
<body>
<p>Test passes if the width of the blue box is the same as the orange bar below.</p>
<div>
<textarea cols="500" rows="10"></textarea>
<div></div>
</div>
</body>
</html>

View file

@ -0,0 +1,30 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Attribute 'width' vs. CSS 'width' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'width' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
html, body, p, table, tr
{
background: white;
width: auto;
}
*
{
background: blue;
width: 0;
}
</style>
</head>
<body>
<p>Test passes if the blue box below is only large enough to fit the "Filler Text".</p>
<table>
<tr>
<td width="5000">Filler Text</td>
</tr>
</table>
</body>
</html>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Attribute 'face' vs. CSS 'font-family' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="ahem" />
<meta name="assert" content="Attribute 'face' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
*
{
font-family: sans-serif;
}
</style>
</head>
<body>
<p>Test passes if the two lines of "Filler Text" below look the same.</p>
<font face="ahem">
Filler Text Filler Text
</font>
<div>Filler Text Filler Text</div>
</body>
</html>

View file

@ -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: Attribute 'valign' vs. CSS 'vertical-align' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'valign' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
table
{
border: 1px solid;
border-spacing: 0;
height: 200px;
width: 100%;
}
*
{
padding: 0;
vertical-align: top;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" is at the top-left corner of the box below.</p>
<table>
<tr>
<td valign="bottom">Filler Text</td>
</tr>
</table>
</body>
</html>

View file

@ -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 Test: Attribute 'frame' vs. CSS 'border' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'frame' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
html, body, p
{
width: auto;
}
*
{
border: none;
width: 100%;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" has no box around it.</p>
<table frame="box">
<tr>
<td>Filler Text</td>
</tr>
</table>
</body>
</html>

View file

@ -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: Attribute 'rules' vs. CSS border specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'rules' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
html, body, p
{
width: auto;
}
*
{
border: 0 none transparent;
width: 100%;
}
</style>
</head>
<body>
<p>Test passes if there are no lines or boxes around the "Filler Text" below.</p>
<table rules="all">
<tr>
<td>Filler Text</td>
<td>Filler Text</td>
</tr>
<tr>
<td>Filler Text</td>
<td>Filler Text</td>
</tr>
</table>
</body>
</html>

View file

@ -0,0 +1,24 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Attribute 'height' vs. CSS 'height' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'height' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
html, body, p
{
height: auto;
}
*
{
height: 300px;
}
</style>
</head>
<body>
<p>Test passes if there is a green box below.</p>
<iframe height="0" src="support/html-attribute-017-frame.htm"></iframe>
</body>
</html>

View file

@ -0,0 +1,27 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Attribute 'hspace' vs. CSS 'margin' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="image" />
<meta name="assert" content="Attribute 'hspace' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
html, body, p
{
margin: 10px;
}
*
{
margin: -5px;
}
</style>
</head>
<body>
<p>Test passes if there is no space between the green and blue boxes below.</p>
<div>
<img hspace="200" alt="15x15 blue box" src="support/blue15x15.png" />
<img alt="15x15 green box" src="support/green15x15.png" />
</div>
</body>
</html>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Attribute 'vspace' vs. CSS 'margin' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="image" />
<meta name="assert" content="Attribute 'vspace' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
div
{
font: 16px/15px serif;
}
img
{
vertical-align: bottom; /* images must sit at bottom of line box, not on the baseline */
}
div *
{
margin: 0px;
}
</style>
</head>
<body>
<p>Test passes if there is no space between the green and blue boxes below.</p>
<div><img vspace="200" alt="15x15 blue box" src="support/blue15x15.png" /></div>
<div><img alt="15x15 green box" src="support/green15x15.png" /></div>
</body>
</html>

View file

@ -0,0 +1,22 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Attribute 'link' vs. CSS ':link' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'link' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
*:link
{
color: green;
}
</style>
</head>
<body link="red">
<p>Test passes if the "Filler Text" below is green.</p>
<div>
<a href="#">Filler Text</a>
</div>
</body>
</html>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Attribute 'marginheight' vs. CSS 'margin' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'marginheight' has a specificity of zero and is overridden by CSS." />
<style type="text/css"></style>
</head>
<body>
<iframe marginheight="50" src="support/html-attribute-021-frame.htm"></iframe>
<p>Test passes if the "Filler Text" appears in the top left corner of the green box.</p>
</body>
</html>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Attribute 'marginwidth' vs. CSS 'margin' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'marginwidth' has a specificity of zero and is overridden by CSS." />
<style type="text/css"></style>
</head>
<body>
<iframe marginwidth="50" src="support/html-attribute-022-frame.htm"></iframe>
<p>Test passes if the "Filler Text" appears in the top left corner of the green box.</p>
</body>
</html>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: HTML 'noshade' attribute vs CSS color specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'noshade' has 0 specificity and is overridden by CSS." />
<style type="text/css">
html, body, p
{
background-color: white;
}
*
{
background-color: lime;
border-color: lime;
}
</style>
</head>
<body>
<p>Test passes if the line below is solid bright green.</p>
<hr noshade="noshade" size="6" />
</body>
</html>

View file

@ -0,0 +1,33 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Attribute 'nowrap' vs. CSS 'white-space' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'nowrap' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
table
{
width: 100px;
}
td
{
border: solid thin black;
}
*
{
white-space: normal;
}
</style>
</head>
<body>
<p>Test passes if both columns of "Filler Text" below wrap to multiple lines.</p>
<table>
<tr>
<td nowrap="nowrap">Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text</td>
<td nowrap="nowrap">Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text</td>
</tr>
</table>
</body>
</html>

View file

@ -0,0 +1,50 @@
<!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: Attribute 'rows' vs CSS 'height' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'rows' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
html
{
margin: 10px;
}
html, body, p, table, tr, td
{
border: none;
border-spacing: 0;
height: auto;
}
*
{
height: 150px;
border: 1px solid blue;
padding: 0;
margin: 0;
vertical-align: top;
}
div
{
background: orange;
border: none;
height: 152px;
width: 10px;
}
</style>
</head>
<body>
<p>Test passes if the height of the blue box is the same as the orange bar below.</p>
<table>
<tr>
<td>
<textarea rows="500" cols="5"></textarea>
</td>
<td>
<div></div>
</td>
</tr>
</table>
</body>
</html>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Attribute 'size' vs CSS 'height' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'size' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
html, body, p
{
background: white;
height: auto;
}
*
{
background: green;
height: 1px;
}
</style>
</head>
<body>
<p>Test passes if there is a line below.</p>
<hr size="100" />
</body>
</html>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Attribute 'text' vs. CSS 'color' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<link rel="match" href="../reference/filler-text-below-green.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="Attribute 'text' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
p
{
color: black;
}
*
{
color: green;
}
</style>
</head>
<body text="red">
<p>Test passes if the "Filler Text" below is green.</p>
<div>Filler Text</div>
</body>
</html>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Attribute 'vlink' vs. CSS ':visited' specificity</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<meta name="flags" content="history interact" />
<meta name="assert" content="Attribute 'vlink' has a specificity of zero and is overridden by CSS." />
<style type="text/css">
*:visited
{
color: green;
}
</style>
</head>
<body vlink="red">
<p>PREREQUSITE: Navigate to the "Filler Text" link below.</p>
<p>Test passes if the "Filler Text" below is green.</p>
<div>
<a href="#">Filler Text</a>
</div>
</body>
</html>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Element selector precedence</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#preshint" />
<link rel="match" href="../reference/filler-text-below-green.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="The 'color' attribute has a specificity equal to 0 which be overridden by subsequent style sheet rules." />
<style type="text/css">
span
{
color: green;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div>
<font color="red">
<span>Filler Text</span>
</font>
</div>
</body>
</html>

View file

@ -0,0 +1,24 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Universal selector precedence</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html" />
<meta name="flags" content="" />
<meta name="assert" content="The universal selector and the 'color' attribute have the same specificity. The universal selector is applied since CSS takes precedence." />
<style type="text/css">
*
{
color: green;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div>
<font color="red">
<span>Filler Text</span>
</font>
</div>
</body>
</html>

View file

@ -0,0 +1,27 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: User style sheet precedence</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html" />
<meta name="flags" content="userstyle" />
<meta name="assert" content="The 'font' element's 'color' attribute trumps the user stylesheet's universal selector. They have the same specificity but the font element is a virtual author rule." />
<style type="text/css">
p
{
color: black;
}
div
{
color: red;
}
</style>
</head>
<body>
<p id="htmlPrecedence003">PREREQUISITE: The <a href="support/html-precedence-003.css">"html-precedence-003.css"</a> file is enabled as the user agent's user style sheet.</p>
<p>Test passes if the "Filler Text" below is green and it is underlined.</p>
<div>
<font color="green">Filler Text</font>
</div>
</body>
</html>

View file

@ -0,0 +1,25 @@
<!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 Reftest Reference</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<style type="text/css"><![CDATA[
p.green {color: green;}
]]></style>
</head>
<body>
<p class="green">This text should be green.</p>
<p>This text should not be bold.</p>
<p class="green">This line should be green.</p>
</body>
</html>

View file

@ -0,0 +1,31 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: User Stylesheets and non-CSS Presentational Hints</title>
<link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
<link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/cascade/non-css/001.html" type="text/html"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html" />
<link rel="match" href="html-precedence-004-ref.xht" />
<meta name="flags" content="userstyle" />
<style type="text/css">
.instructions { color: red; }
</style>
</head>
<body id="hixie-cascade-tests">
<div class="instructions">
<p>For this test, set your user stylesheet to the following:</p>
<pre>
/* User Stylesheet */
#hixie-cascade-tests .instructions { display: none; }
#hixie-cascade-tests .red { color: red; }
#hixie-cascade-tests .green { color: green; }
#hixie-cascade-tests .normal { font-weight: normal; }
</pre>
</div>
<p><font color="green" class="red">This text should be green.</font></p>
<p><b class="normal">This text should</b> not be bold.</p>
<p class="green">This line should be green.</p>
</body>
</html>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: User Stylesheets and non-CSS Presentational Hints</title>
<link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
<link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/cascade/non/css/002.xml" type="application/xhtml+xml"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html" />
<meta name="flags" content="userstyle" />
<style type="text/css">
.instructions { color: red; }
</style>
</head>
<body id="hixie-cascade-tests">
<div class="instructions">
<p>For this test, set your user stylesheet to the following:</p>
<pre>
/* User Stylesheet */
#hixie-cascade-tests .instructions { display: none; }
#hixie-cascade-tests .red { color: red; }
#hixie-cascade-tests .green { color: green; }
#hixie-cascade-tests .normal { font-weight: normal; }
</pre>
</div>
<p><font color="red" class="green">This text should be green.</font></p>
<p><b class="normal">This text should</b> not be bold.</p>
<p class="green">This line should be green.</p>
</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 Test: Inherit keyword</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit" />
<meta name="flags" content="" />
<meta name="assert" content="Children elements inherit the parents color given the 'inherit' keyword." />
<style type="text/css">
body
{
color: green;
}
div
{
color: red;
}
body div
{
color: inherit;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div>Filler Text</div>
</body>
</html>

View file

@ -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 Test: Inherit on non-inherited properties</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit" />
<meta name="flags" content="" />
<meta name="assert" content="Inherit can be used on properties which are not normally inherited." />
<style type="text/css">
div
{
border: solid blue;
}
div p
{
border: inherit;
border-color: orange;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is surrounded by a orange box and a blue box.</p>
<div>
<p>Filler Text</p>
</div>
</body>
</html>

View file

@ -0,0 +1,38 @@
<!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: Inherit on the root element</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit" />
<meta name="flags" content="" />
<meta name="assert" content="If the 'inherit' value is set on the root element, the property is assigned its initial value." />
<style type="text/css">
html
{
font-size: 1in;
font-size: inherit;
font-style: italic;
font-style: inherit;
font-variant: small-caps;
font-variant: inherit;
font-weight: bold;
font-weight: inherit;
}
span
{
font-size: medium;
font-style: normal;
font-variant: normal;
font-weight: normal;
}
</style>
</head>
<body>
<p>Test passes if the two lines of "Filler Text" below are identical.</p>
<div>
Filler Text
<br />
<span>Filler Text</span>
</div>
</body>
</html>

View file

@ -0,0 +1,19 @@
<!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: CSS inheritance: basic test</title>
<link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-04-08 -->
<link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/inheritance/001.html" type="text/html"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#fonts-intro" />
<style type="text/css">
p { color: blue; }
.test { font-weight: inherit; font-style: inherit; color: inherit; }
.test span { font-weight: bold; font-style: italic; color: red; }
</style>
</head>
<body>
<p> <span class="test"> This sentence should be <span> </span> the same throughout. </span> </p>
</body>
</html>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Explicit Inheritance</title>
<link title="6.2 Inheritance" href="http://www.w3.org/TR/CSS21/cascade.html#inheritance" rel="help"/>
<link title="8.4 Padding properties" href="http://www.w3.org/TR/CSS21/box.html#padding-properties" rel="help"/>
<link title="8.5 Border properties" href="http://www.w3.org/TR/CSS21/box.html#border-properties" rel="help"/>
<link rel="author" href="mailto:Alan.Harder@Sun.COM" title="Alan Harder"/>
<style type="text/css">
.a { border: 0 solid lime; }
.b { border-width: thick; border-style: inherit; border-color: inherit; }
.c { padding: 8px 0; background-color: red; }
.d { padding: inherit; background-color: lime; }
</style>
</head>
<body>
<p class="a">
This sentence should have no border.
<span class="b"> This sentence should have a green border. </span>
</p>
<p>
<span class="c"><span class="d"> This sentence should be in a green bar, with no red present. </span></span>
</p>
</body>
</html>

View file

@ -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.

View file

@ -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.

View file

@ -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>

View file

@ -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>

View file

@ -0,0 +1,20 @@
<!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: Inheritance</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#inheritance" />
<meta name="flags" content="" />
<meta name="assert" content="Children elements can inherit properties from parents." />
<style type="text/css">
body
{
color: green;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div>Filler Text</div>
</body>
</html>

View file

@ -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: Inheriting computed values</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html" />
<meta name="flags" content="ahem" />
<meta name="assert" content="The computed value of a font-size with a percentage is the percentage of its parent's font-size value. A nested element which also has a percentage applies the parents' specified value (which is inherited)." />
<style type="text/css">
.container
{
font-family: Ahem;
font-size: 96px;
}
div div
{
background: blue;
height: 48px;
width: 48px;
}
div p
{
font-size: 50%;
}
</style>
</head>
<body>
<p>Test passes if the black box and the blue box are the same width.</p>
<div class="container">
<p>X</p>
<div></div>
</div>
</body>
</html>

View file

@ -0,0 +1,24 @@
<!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: Non-inherited values</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#specified-value" />
<meta name="flags" content="" />
<meta name="assert" content="If the cascade results in a value, use it." />
<style type="text/css">
*
{
color: green;
}
body
{
color: red;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div>Filler Text</div>
</body>
</html>

View file

@ -0,0 +1,45 @@
<!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: Casdading order - sort by order specified</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" title="6.4.1 Cascading order" href="http://www.w3.org/TR/CSS21/cascade.html#cascading-order" />
<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
<meta content="" name="flags" />
<meta content="If 2 declarations have the same media, the same importance (normal or !important), the same origin (author, user or user agent) and the same specificity, then the latter specified wins." name="assert" />
<style type="text/css"><![CDATA[
div
{
height: 100px;
width: 100px;
}
div#parent > div /* a=0 b=1 c=0 d=2 -> specificity = 0,1,0,2 */
{
background-color: red;
}
div > div#child /* a=0 b=1 c=0 d=2 -> specificity = 0,1,0,2 */
{
background-color: green;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="parent">
<div id="child"></div>
</div>
</body>
</html>

View file

@ -0,0 +1,25 @@
<!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: Calculating specificity - Specificity 0010 vs. 0001</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#specificity" />
<link rel="match" href="../reference/filler-text-below-green.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="The attribute selector has an higher specificity over the element selector - specificity 0010 takes precedence over 0001." />
<style type="text/css">
[id=id1] /* a=0 b=0 c=1 d=0 -> specificity = 0,0,1,0 */
{
color: green;
}
div /* a=0 b=0 c=0 d=1 -> specificity = 0,0,0,1 */
{
color: red;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div id="id1">Filler Text</div>
</body>
</html>

View file

@ -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: Calculating specificity - Inline Style</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#specificity" />
<link rel="match" href="../reference/filler-text-below-green.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="Specificity of the inline style trumps all other selectors." />
<meta http-equiv="Content-Style-Type" content="text/css" />
<style type="text/css">
#id1 /* a=0 b=1 c=0 d=0 -> specificity = 0,1,0,0 */
{
color: red;
}
div:first-child /* a=0 b=0 c=1 d=1 -> specificity = 0,0,1,1 */
{
color: red;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div id="id1" style="color: green">Filler Text</div>
</body>
</html>

View file

@ -0,0 +1,25 @@
<!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: Calculating specificity - Specificity 0100 vs. 0011</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#specificity" />
<link rel="match" href="../reference/filler-text-below-green.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="The ID attribute in a selector has the higher specificity than the combined pseudo-class and element selectors - specificity 0100 takes precedence over 0011." />
<style type="text/css">
#id1 /* a=0 b=1 c=0 d=0 -> specificity = 0,1,0,0 */
{
color: green;
}
div:first-child /* a=0 b=0 c=1 d=1 -> specificity = 0,0,1,1 */
{
color: red;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div id="id1">Filler Text</div>
</body>
</html>

View file

@ -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 Test: Calculating specificity - Specificity 0011 vs. 0010</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#specificity" />
<link rel="match" href="../reference/filler-text-below-green.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="The combined pseudo-class and element selectors have a higher specificity than the attribute selector - specificity 0011 takes precedence over 0010." />
<style type="text/css">
div:first-child /* a=0 b=0 c=1 d=1 -> specificity = 0,0,1,1 */
{
color: green;
}
[id=id1] /* a=0 b=0 c=1 d=0 -> specificity = 0,0,1,0 */
{
color: red;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div>
<div id="id1">Filler Text</div>
</div>
</body>
</html>

View file

@ -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 Test: Calculating specificity - Specificity 0002 vs. 0001</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#specificity" />
<link rel="match" href="../reference/filler-text-below-green.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="An element selector with a pseudo-element selector wins over a pseudo-element selector - specificity 0002 takes precedence over 0001." />
<style type="text/css">
div:first-line /* a=0 b=0 c=0 d=2 -> specificity = 0,0,0,2 */
{
color: green;
}
:first-line /* a=0 b=0 c=0 d=1 -> specificity = 0,0,0,1 */
{
color: red;
}
#p1:first-line
{
color: black;
}
</style>
</head>
<body>
<p id="p1">Test passes if the "Filler Text" below is green.</p>
<div>Filler Text</div>
</body>
</html>

View file

@ -0,0 +1,25 @@
<!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: Calculating specificity - Pseudo-element vs. simple element</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#specificity" />
<link rel="match" href="../reference/filler-text-below-green.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="The combination of a pseudo-element selector with an element selector takes takes precedence over simple and single element selector - specificity 0002 takes precedence over 0001." />
<style type="text/css">
div:first-line /* a=0 b=0 c=0 d=2 -> specificity = 0,0,0,2 */
{
color: green;
}
div /* a=0 b=0 c=0 d=1 -> specificity = 0,0,0,1 */
{
color: red;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div>Filler Text</div>
</body>
</html>

View file

@ -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 Test: Calculating specificity - Specificity 0001 vs. 0000</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#specificity" />
<link rel="match" href="../reference/filler-text-below-green.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="The element selector has a higher specificity over the universal selector - specificity 0001 takes precedence over 0000." />
<style type="text/css">
div /* a=0 b=0 c=0 d=1 -> specificity = 0,0,0,1 */
{
color: green;
}
* /* a=0 b=0 c=0 d=0 -> specificity = 0,0,0,0 */
{
color: red;
}
p
{
color: black;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div>Filler Text</div>
</body>
</html>

View file

@ -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 Test: Calculating specificity - specificity 0012 vs. 0002</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#specificity" />
<link rel="match" href="../reference/filler-text-below-green.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="The combined specificity of an element selector, with a pseudo-class selector and a pseudo-element selector achieves an higher specificity than the combined specificity of an element selector with a pseudo-element selector." />
<style type="text/css">
div:first-child:first-line /* a=0 b=0 c=1 d=2 -> specificity = 0,0,1,2 */
{
color: green;
}
div:first-line /* a=0 b=0 c=0 d=2 -> specificity = 0,0,0,2 */
{
color: red;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div>
<div>Filler Text</div>
</div>
</body>
</html>

View file

@ -0,0 +1,24 @@
<!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: Calculating specificity - specificity 0003 vs. 0002</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#specificity" />
<meta name="flags" content="" />
<meta name="assert" content="First-line selector with highest specificity wins - specificity 0003 take precedence over 0002." />
<style type="text/css">
html > body > *:first-line /* a=0 b=0 c=0 d=3 -> specificity = 0,0,0,3 */
{
color: green;
}
div:first-line /* a=0 b=0 c=0 d=2 -> specificity = 0,0,0,2 */
{
color: red;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div>Filler Text</div>
</body>
</html>

View file

@ -0,0 +1,25 @@
<!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 Reftest Reference</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<style type="text/css"><![CDATA[
span
{
border-bottom: blue solid;
border-top: teal solid;
}
]]></style>
</head>
<body>
<p>This test has: <span>PASSED</span></p>
</body>
</html>

View file

@ -0,0 +1,21 @@
<!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: Generated Content via Universal Selectors</title>
<link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
<link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/cascade/specificity/001.html" type="text/html"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#specificity" />
<link rel="match" href="specificity-011-ref.xht" />
<style type="text/css">
p:after { content: "FAILED"; border: none; }
div :after { content: "PASSED"; border-top: solid teal; }
body div :after { border-bottom: solid blue; }
</style>
</head>
<body>
<div>
<p>This test has: </p>
</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 Test: Pseudo-class Specificity</title>
<link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
<link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/cascade/specificity/002.html" type="text/html"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#specificity" />
<meta name="flags" content="history interact" />
<style type="text/css">
a:link { color: yellow; background: red; }
a:hover { color: red; background: yellow; font-weight: bold; }
a:visited { color: green; background: white; }
</style>
</head>
<body>
<p><a href="002.html">This text should be green <strong>when you
hover over it</strong>.</a> (If it starts red, click the link to
make sure the link is marked visited.)</p>
</body>
</html>

View file

@ -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 Reftest Reference</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<style type="text/css"><![CDATA[
p
{
background-color: green;
border: lime solid medium;
color: white;
}
]]></style>
</head>
<body>
<p>The background of this sentence should be green.</p>
</body>
</html>

View file

@ -0,0 +1,21 @@
<!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: Specificity with universal selector</title>
<link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
<link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/cascade/specificity/003.html" type="text/html"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#specificity" />
<link rel="match" href="specificity-013-ref.xht" />
<style type="text/css"><![CDATA[
p { color: yellow; background: red; border: maroon; } /* selects the <p> with 0,0,0,1 */
div * { color: white; background: green; } /* selects the <p> with 0,0,0,1 and so should override */
body div * { border: solid lime; } /* selects the <p> with 0,0,0,2 */
]]></style>
</head>
<body>
<div>
<p>The background of this sentence should be green.</p>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

Some files were not shown because too many files have changed in this diff Show more