Update web-platform-tests to revision b'7af9d6ec48ab04043a2bea85a3599904a1a19efa'

This commit is contained in:
WPT Sync Bot 2021-02-21 08:20:50 +00:00 committed by Josh Matthews
parent 8050c95e31
commit 87be1008de
2742 changed files with 142451 additions and 40667 deletions

View file

@ -0,0 +1,13 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Reftest Reference</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<style>
p {
color: green;
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,5 @@
p {
color: red;
--a: green;
color: var(--a);
}

View file

@ -0,0 +1,15 @@
@font-face {
--a: MyTestFontName;
font-family: var(--a);
src: url(/fonts/Ahem.ttf);
}
@font-face {
font-family: MyTestFontName2;
src: url(/fonts/Ahem.ttf);
}
#a {
font-family: MyTestFontName, serif;
}
#b {
font-family: MyTestFontName2, serif;
}

View file

@ -0,0 +1,6 @@
:root {
--a: green;
}
p {
color: var(--a);
}

View file

@ -0,0 +1,4 @@
body { color: red; }
@supports (color:var(--a)) {
p { color: green; }
}

View file

@ -0,0 +1,17 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable consisting of a single token preceded by white space.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
--a: green;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,17 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable consisting of a single token with no preceding white space.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
--a:green;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,18 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that references another variable.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
--a: var(--b);
--b: green;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,18 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable consisting of a variable reference followed by white space.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
--a: var(--b) ;
--b: green;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,18 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable consisting of a variable reference that includes white space around the variable name.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
--a: var( --b ) ;
--b: green;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,18 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test overriding an existing variable declaration.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
--a: orange;
--a: green;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,19 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable with invalid syntax due to a variable reference having no tokens in its fallback.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
--a: green;
--b: crimson;
--a: var(--b,);
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,19 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that consists of a variable reference whose fallback is white space.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
--a: orange;
--b: green;
--a: var(--b, );
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,19 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable with invalid syntax due to a variable reference having only a comment in its fallback.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
--a: green;
--b: crimson;
--a: var(--b,/**/);
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,19 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that consists of a variable reference with a fallback that includes a comment and an identifier.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
--a: orange;
--b: green;
--a: var(--b,/**/a);
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,19 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable with invalid syntax due to a variable reference having a '!' token at the top level of its fallback.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
--a: green;
--b: crimson;
--a: var(--b,!);
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,19 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable with invalid syntax due to a variable reference having a ';' token at the top level of its fallback.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
--a: green;
--b: crimson;
--a: var(--b,;);
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,19 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable with invalid syntax due to a variable reference having "!important" the top level of its fallback.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
--a: green;
--b: crimson;
--a: var(--b,!important);
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,21 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that consists of a variable reference and a following identifier with no intervening white space.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: green;
}
span {
color: red;
--a:var(--b)red;
--b:orange;
color: var(--a);
}
</style>
<p><span>This text must be green.</span></p>

View file

@ -0,0 +1,15 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Reftest Reference</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="stylesheet" href="/fonts/ahem.css" type="text/css">
<meta name="flags" content="ahem">
<style>
p {
font-family: Ahem, sans-serif;
}
</style>
<p>This text must be in Ahem.</p>

View file

@ -0,0 +1,22 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that consists of a comma-separated font family list.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="variable-declaration-15-ref.html">
<meta name="flags" content="ahem">
<link rel="stylesheet" href="/fonts/ahem.css" type="text/css">
<style>
body {
font-family: serif;
}
p {
font-family: monospace;
--a: Ahem, sans-serif;
font-family: var(--a);
}
</style>
<p>This text must be in Ahem.</p>

View file

@ -0,0 +1,15 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Reftest Reference</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="stylesheet" href="/fonts/ahem.css" type="text/css">
<meta name="flags" content="ahem">
<style>
p {
font-family: Ahem, sans-serif;
}
</style>
<p>This text must be in Ahem.</p>

View file

@ -0,0 +1,23 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that consists of a comma-separated font family list with the first item being a variable reference.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="variable-declaration-16-ref.html">
<meta name="flags" content="ahem">
<link rel="stylesheet" href="/fonts/ahem.css" type="text/css">
<style>
body {
font-family: serif;
}
p {
font-family: monospace;
--a: var(--b), sans-serif;
--b: Ahem;
font-family: var(--a);
}
</style>
<p>This text must be in Ahem.</p>

View file

@ -0,0 +1,15 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Reftest Reference</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="stylesheet" href="/fonts/ahem.css" type="text/css">
<meta name="flags" content="ahem">
<style>
p {
font-family: SomeUnknownFont, Ahem;
}
</style>
<p>This text must be in Ahem.</p>

View file

@ -0,0 +1,23 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that consists of a comma-separated font family list with the last item being a variable reference.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="variable-declaration-17-ref.html">
<meta name="flags" content="ahem">
<link rel="stylesheet" href="/fonts/ahem.css" type="text/css">
<style>
body {
font-family: serif;
}
p {
font-family: monospace;
--a: SomeUnknownFont, var(--b);
--b: Ahem;
font-family: var(--a);
}
</style>
<p>This text must be in Ahem.</p>

View file

@ -0,0 +1,15 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Reftest Reference</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="stylesheet" href="/fonts/ahem.css" type="text/css">
<meta name="flags" content="ahem">
<style>
p {
font-family: Ahem, sans-serif;
}
</style>
<p>This text must be in Ahem.</p>

View file

@ -0,0 +1,23 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that consists of a comma-separated font family list with the comma coming from a variable reference.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="variable-declaration-18-ref.html">
<meta name="flags" content="ahem">
<link rel="stylesheet" href="/fonts/ahem.css" type="text/css">
<style>
body {
font-family: serif;
}
p {
font-family: monospace;
--a: Ahem var(--b) sans-serif;
--b: ,;
font-family: var(--a);
}
</style>
<p>This text must be in Ahem.</p>

View file

@ -0,0 +1,21 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that consists of a function where one of the arguments is a variable reference.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--a: rgb(0, var(--b), 0);
--b: 128;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,21 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable with "!important".</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--a: var(--b) !important;
--b: green;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,23 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that consists of a function where all of the arguments and commas are made up of variable references.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--a: rgb(var(--b)var(--c)var(--d));
--b: 0,;
--c: 128,;
--d: 0;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that consists of a variable reference with a number of levels of variable reference fallbacks.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--a: var(--b, var(--c, var(--d, green)));
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,22 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable with invalid syntax due to having two "!important" priorities.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--a: green;
--b: crimson;
--a: var(--b) !important !important;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,25 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that contains a CDO token.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
color: green;
}
p {
color: red;
}
p {
color: orange;
--a: green;
--b: crimson;
--a: var(--b) <!--;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,25 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that contains a CDC token.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
color: green;
}
p {
color: red;
}
p {
color: orange;
--a: green;
--b: crimson;
--a: --> var(--b);
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that contains only a white space token.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--a: ;
color: var(--a) green;
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,21 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable with invalid syntax due to having no tokens.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--a: green;
--a:;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable with a valid custom property name "--".</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--: green;
color: var(--,crimson);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,21 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that contains a variable reference to itself.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#cycles">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--a: crimson;
--a: var(--a);
color: var(--a,green);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable where the variable name begins with a digit.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--0: green;
color: var(--\30);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable where the variable name begins with an escaped digit.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--\30: green;
color: var(--\30);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable where the variable name begins with an escaped letter.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--\61: green;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable where the variable name begins with a lone surrogate.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--\d800: green;
color: var(--\fffd);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable where the variable name begins with U+FFFD.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--\fffd: green;
color: var(--\fffd);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable where the variable name begins with an out-of-range Unicode character escape.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--\ffffff: green;
color: var(--\fffd);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable consisting of a variable reference where white space surrounds the comma separating the variable name and fallback.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--a: var(--b , );
color: var(--a) green;
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,21 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring two variables in the same declaration block that differ only in case, with lowercase first.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--a: green;
--A: crimson;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,21 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring two variables in the same declaration block that differ only in case, with uppercase first.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--A: green;
--a: crimson;
color: var(--A);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,21 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable with an invalid custom property name due to it beginning with "VAR-".</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--a: green;
VAR-a: crimson;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable where the second '-' in the "--" prefix of the custom property name is escaped.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
-\2d a: green;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,21 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable where the custom property name includes an unescaped Chinese character and an escape that is terminated by a space character.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<meta charset=utf-8>
<style>
p {
color: red;
}
p {
color: orange;
--a-长-name-that-might-be-longer-than-you\27 d-normally-use: green;
color: var(--a-长-name-that-might-be-longer-than-you\27 d-normally-use);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable whose value is "initial".</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--a: initial;
color: var(--a,green);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable whose value is "inherit" where there is no variable to inherit from.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--a: inherit;
color: var(--a,green);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,24 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable whose value is "inherit" where there is a variable to inherit from.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
--a: green;
color: crimson;
}
p {
color: red;
}
p {
color: orange;
--a: inherit;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,23 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable whose value is "initial" where there is a variable to inherit from.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
--a: crimson;
}
p {
color: red;
}
p {
color: orange;
--a: initial;
color: var(--a,green);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,25 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable whose value consists of a reference to a variable whose value is "inherit".</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
--b: green;
color: crimson;
}
p {
color: red;
}
p {
color: orange;
--a: var(--b);
--b: inherit;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,25 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a number of variables in a cycle.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#cycles">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
color: green;
}
p {
color: crimson;
--a: red var(--b);
--b: var(--c);
--c: var(--d);
--d: var(--e);
--e: var(--a);
--f: var(--e);
color: var(--f);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,26 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that is a dependent of a variable involved in a cycle but which itself is not involved in a cycle.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#cycles">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
color: orange;
}
p {
color: crimson;
--a: red var(--b) var(--g);
--b: var(--c);
--c: var(--d);
--d: var(--e);
--e: var(--a);
--f: var(--e);
--g: green;
color: var(--g);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,25 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a number of variables in a chain, where the final element of the chain uses its fallback.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#cycles">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
color: green;
}
p {
color: crimson;
--a: var(--b,red);
--b: var(--c);
--c: var(--d);
--d: var(--e);
--e: var(--a);
--f: var(--e);
color: var(--f);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,24 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that consists of a reference to an invalid inherited variable.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#invalid-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
color: orange;
--c: var(--a);
}
p {
--a: var(--b);
}
p {
color: red;
--b: var(--c,green);
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,24 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that consists of a reference to an inherited variable whose value was a variable reference that used its fallback.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
color: orange;
--c: var(--a,green);
}
p {
--a: var(--b);
}
p {
color: red;
--b: var(--c,crimson);
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,22 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that consists of two variable references without fallback and with no intervening white space.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: green;
}
span {
color: red;
--a:var(--b)var(--c);
--b:orange;
--c:red;
color: var(--a);
}
</style>
<p><span>This text must be green.</span></p>

View file

@ -0,0 +1,21 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that consists of two variable references with the first variable reference using fallback and with no intervening white space.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: green;
}
span {
color: red;
--a:var(--b,orange)var(--c);
--c:red;
color: var(--a);
}
</style>
<p><span>This text must be green.</span></p>

View file

@ -0,0 +1,21 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable that consists of two variable references with the second variable reference using fallback and with no intervening white space.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: green;
}
span {
color: red;
--a:var(--b)var(--c,red);
--b:orange;
color: var(--a);
}
</style>
<p><span>This text must be green.</span></p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable whose value is "unset" where there is no variable to inherit from.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
}
p {
color: orange;
--a: unset;
color: var(--a,green);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,24 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable whose value is "unset" where there is a variable to inherit from.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
--a: green;
color: crimson;
}
p {
color: red;
}
p {
color: orange;
--a: unset;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,25 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable whose value consists of a reference to a variable whose value is "unset".</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
--b: green;
color: crimson;
}
p {
color: red;
}
p {
color: orange;
--a: var(--b);
--b: unset;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,17 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable with a trailing invalid token.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: var(--a);
--a: green;
--a: red);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,23 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<meta charset=utf-8>
<title>CSS Test: Test declaring a variable with a value whose name is "initial" but using Turkish dotted/dotless 'i's.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<style>
div {
color: orange;
--a: green;
color: var(--a);
}
p {
--b: İnitial;
--c: ınitial;
color: var(--b,var(--c,red));
}
</style>
<div><p>This text must be green.</p></div>

View file

@ -0,0 +1,12 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a variable in an external CSS file.</title>
<link rel="author" title="Mihaela Velimiroviciu" href="mailto:mihaela.velimiroviciu@softvisioninc.eu">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#syntax">
<link rel="match" href="support/color-green-ref.html">
<link rel="stylesheet" type="text/css" href="support/external-variable-declaration.css">
<p>This text must be green.</p>

View file

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Reftest Reference</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="stylesheet" href="/fonts/ahem.css" type="text/css">
<meta name="flags" content="ahem">
<p style="font-family: serif">This text must not be in Ahem.</p>
<p style="font-family: Ahem">But this text must be in Ahem.</p>

View file

@ -0,0 +1,13 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test the invalid declaration and use of a variable in an @font-face rule within an external CSS.</title>
<link rel="author" title="Mihaela Velimiroviciu" href="mailto:mihaela.velimiroviciu@softvisioninc.eu">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="variable-external-font-face-01-ref.html">
<link rel="stylesheet" type="text/css" href="support/external-variable-font-face.css">
<meta name="flags" content="ahem">
<p id=a>This text must not be in Ahem.</p>
<p id=b>But this text must be in Ahem.</p>

View file

@ -0,0 +1,12 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test the use of a variable in a non-custom property where the variable value is inherited within an external CSS.</title>
<link rel="author" title="Mihaela Velimiroviciu" href="mailto:mihaela.velimiroviciu@softvisioninc.eu">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="stylesheet" type="text/css" href="support/external-variable-reference.css">
<link rel="match" href="support/color-green-ref.html">
<p>This text must be green.</p>

View file

@ -0,0 +1,12 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test a passing non-custom property declaration in an @supports rule where the property value contains a variable reference within an external stylesheet file.</title>
<link rel="author" title="Mihaela Velimiroviciu" href="mailto:mihaela.velimiroviciu@softvisioninc.eu">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="stylesheet" type="text/css" href="support/external-variable-supports.css">
<link rel="match" href="support/color-green-ref.html">
<p>This text must be green.</p>

View file

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Reftest Reference</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="stylesheet" href="/fonts/ahem.css" type="text/css">
<meta name="flags" content="ahem">
<p style="font-family: serif">This text must not be in Ahem.</p>
<p style="font-family: Ahem">But this text must be in Ahem.</p>

View file

@ -0,0 +1,29 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test the invalid declaration and use of a variable in an @font-face rule.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="variable-font-face-01-ref.html">
<meta name="flags" content="ahem">
<style>
@font-face {
--a: MyTestFontName;
font-family: var(--a);
src: url(/fonts/Ahem.ttf);
}
@font-face {
font-family: MyTestFontName2;
src: url(/fonts/Ahem.ttf);
}
#a {
font-family: MyTestFontName, serif;
}
#b {
font-family: MyTestFontName2, serif;
}
</style>
<p id=a>This text must not be in Ahem.</p>
<p id=b>But this text must be in Ahem.</p>

View file

@ -0,0 +1,11 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Reftest Reference</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="stylesheet" href="/fonts/ahem.css" type="text/css">
<meta name="flags" content="ahem">
<p style="font-family: serif">This text must not be in Ahem.</p>
<p style="font-family: Ahem">But this text must be in Ahem.</p>

View file

@ -0,0 +1,31 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test the invalid use of a variable in an @font-face rule where the variable is defined on the root element.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="variable-font-face-02-ref.html">
<meta name="flags" content="ahem">
<style>
:root {
--a: MyTestFontName;
}
@font-face {
font-family: var(--a);
src: url(/fonts/Ahem.ttf);
}
@font-face {
font-family: MyTestFontName2;
src: url(/fonts/Ahem.ttf);
}
#a {
font-family: MyTestFontName, serif;
}
#b {
font-family: MyTestFontName2, serif;
}
</style>
<p id=a>This text must not be in Ahem.</p>
<p id=b>But this text must be in Ahem.</p>

View file

@ -0,0 +1,18 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test the use of a variable in a non-custom property where the variable value is inherited.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
:root {
--a: green;
}
p {
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,23 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test the use of a variable in a non-custom property where the value is invalid at computed-value time due to referencing a non-existent variable.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#invalid-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
:root {
--a: crimson;
color: red;
}
body {
color: green;
}
p {
color: orange;
color: var(--a) var(--b);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,21 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test the use of two variables in a non-custom property where the variable values are inherited and one of the variable values consists only of white space.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
:root {
--a: green;
--b: ;
color: red;
}
p {
color: crimson;
color: var(--a) var(--b);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test the use of two variables in a non-custom property where one variable is inherited and the other references a non-existing variable with fallback that consists only of white space.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
:root {
--a: green;
color: red;
}
p {
color: crimson;
color: var(--a) var(--b, );
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test the use of a variable in a non-custom property where the values contains no tokens other than the variable reference.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
--a: green;
color: red;
}
p {
color: crimson;
color:var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a non-custom property with invalid syntax due to having a variable reference whose fallback contains no tokens.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
--a: crimson;
color: red;
}
p {
color: green;
color: var(--a,);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a non-custom property with invalid syntax due to having a variable reference whose fallback contains a top level ';' token.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
--a: crimson;
color: red;
}
p {
color: green;
color: var(--a,;);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a non-custom property with invalid syntax due to having a variable reference whose fallback contains a top level '!' token.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
--a: crimson;
color: red;
}
p {
color: green;
color: var(--a,!);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a non-custom property with a variable reference that has a non-top level ';' token.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
--a: green;
color: crimson;
}
p {
color: red;
color: var(--a,(;));
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a non-custom property with a variable reference that has a non-top level '!' token.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
--a: green;
color: crimson;
}
p {
color: red;
color: var(--a,(!));
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a non-custom property with invalid syntax due to having a variable reference whose fallback contains nothing but a comment.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
--a: crimson;
color: red;
}
p {
color: green;
color: var(--a,/**/);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,9 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Reftest Reference</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<p>The words "hello there" must appear below:</p>
<p>hello there</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test the use of variable references in the 'content' property.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="variable-reference-12-ref.html">
<style>
:root {
--a: "hello";
--b: "there";
}
#a:before {
content: var(--a) " " var(--b);
}
</style>
<p>The words "hello there" must appear below:</p>
<p id=a></p>

View file

@ -0,0 +1,18 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test that important variable declarations are not overwritten by subsequent non-important variable declarations in the one declaration block.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
--a: green !important;
--a: crimson;
color: var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test that important variable declarations cascade correctly.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#defining-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
#a {
--a: green !important;
}
p {
color: red;
--a: crimson;
color: var(--a);
}
</style>
<p id=a>This text must be green.</p>

View file

@ -0,0 +1,21 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a non-custom property with two variable references with no intervening white space.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
color: green;
}
p {
color: crimson;
--a: orange;
--b: red;
color: var(--a)var(--b);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,19 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a non-custom property that consists of a variable reference with a number of levels of variable reference fallbacks.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
color: red;
}
p {
color: crimson;
color: var(--a, var(--b, var(--c, green)));
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a non-custom property that consists of a variable reference whose fallback contains a CDO token.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
color: red;
}
p {
color: crimson;
--a: green;
color: var(--a, <!--);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,19 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a non-custom property that contains a variable reference and balanced braces and square brackets.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
color: green;
}
p {
color: red;
color: { [ var(--a) ] };
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,19 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a non-custom property that contains a variable reference and a non-top level ';' token.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
body {
color: green;
}
p {
color: red;
color: [;] var(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,17 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a non-custom property that contains a variable reference whose function token is in uppercase.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
--a: green;
color: VAR(--a);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,17 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a non-custom property that contains a reference to a variable whose name must be escaped.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
--0: green;
color: var(--\30);
}
</style>
<p>This text must be green.</p>

View file

@ -0,0 +1,17 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE html>
<title>CSS Test: Test declaring a non-custom property that contains a reference to a variable whose name is U+FFFD but which was declared and referenced using a lone surrogate.</title>
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
<link rel="match" href="support/color-green-ref.html">
<style>
p {
color: red;
--\d800: green;
color: var(--\d800);
}
</style>
<p>This text must be green.</p>

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