Skip to content

Commit 722907e

Browse files
committed
Add CSS syntax test demo files
1 parent ff66907 commit 722907e

File tree

4 files changed

+910
-0
lines changed

4 files changed

+910
-0
lines changed

examples/tests/added/at-container-tests.css

Whitespace-only changes.

examples/tests/added/nested-tests.css

Whitespace-only changes.
Lines changed: 349 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,349 @@
1+
/* SELECTORS */
2+
3+
/* SELECTORS > TYPE */
4+
p {gap:0}
5+
6+
/* SELECTORS > UNIVERSAL SELECTOR */
7+
* {gap:0}
8+
9+
/* SELECTORS > COMBINATOR */
10+
a > b + * ~ :not(.nah) {gap:0}
11+
12+
/* SELECTORS > DEPRECATED COMBINATOR */
13+
.sooo /deep/ >>>_.>> {gap:0}
14+
15+
/* SELECTORS > COMPLEX */
16+
[disabled], [disabled] + p {gap:0}
17+
[disabled]:not(:first-child)::before:hover
18+
~ div.object
19+
+ #id.thing:hover > strong ~ p::before,
20+
a::last-of-type,/*Comment*/::selection > html[lang^=en-AU],
21+
*>em.i.ly[data-name|=\"Life\"] {gap:0}
22+
23+
/* SELECTORS > CUSTOM ELEMENT */
24+
pearl-1941 1941-pearl -pearl-1941 {gap:0}
25+
pokémon-ピカチュウ {gap:0}
26+
Basecamp-schedule basecamp-Schedule {gap:0}
27+
halo_night {gap:0}
28+
@some-weird-new-feature {gap:0}
29+
some-edgy-new-function() {gap:0}
30+
31+
/* SELECTORS > ATTRIBUTE */
32+
[title] {gap:0}
33+
[hreflang|=fr] {gap:0}
34+
[href^="http://www.w3.org/"] {gap:0}
35+
[*|title] {gap:0}
36+
[marvel|origin=radiation] {gap:0}
37+
[|data-hp="75"] {gap:0}
38+
#div[id="0"] {gap:0}
39+
.bar#div[id="0"] {gap:0}
40+
.div[id="0"] {gap:0}
41+
#bar.div[id] {gap:0}
42+
span[ er|lang |= "%%" ] {gap:0}
43+
a[name\\[0\\]="value"] {gap:0}
44+
a[name\\ space|Get\\ It\\?="kek"] {gap:0}
45+
span[/*]*/lang] {gap:0}
46+
a[href^="#"] a[href^= "#"] a[href^="#" ] {gap:0}
47+
a[href^='#'] a[href^= '#'] a[href^='#' ] {gap:0}
48+
span[class~=Java] {gap:0}
49+
span[class^= 0xDEADCAFE=|~BEEFBABE ] {gap:0}
50+
a[name\\[0\\]=a\\BAD\\AF\\]a\\ i] {gap:0}
51+
a[attr=val i] a[attr="val" i] a[attr=\'val\'I] a[val^= \'"\'i] a[attr= i] a[attr= i i] {gap:0}
52+
span[\n \\x20{2}\n ns|lang/**/\n |=\n\"pt\"] {gap:0}
53+
span[/*===\n==|span[/*}\n====*/*|lang/*]=*/~=/*\"|\"*/\"en-AU\"/*\n |\n*/\ni] {gap:0}
54+
55+
/* SELECTORS > CLASS */
56+
.étendard {gap:0}
57+
.スポンサー {gap:0}
58+
.-- {gap:0}
59+
._ {gap:0}
60+
.\\33\\44-model {gap:0}
61+
.la\\{tex\\} {gap:0}
62+
.B!W{gap:0}
63+
.666{gap:0}
64+
.-911-{gap:0}
65+
.-{gap:0}
66+
67+
/* SELECTORS > ID */
68+
#unicorn {gap:0}
69+
#洪荒之力 {gap:0}
70+
#_zer0-day {gap:0}
71+
#--d3bug-- {gap:0}
72+
#sort!{gap:0}
73+
#666{gap:0}
74+
#-911-{gap:0}
75+
#-{gap:0}
76+
#\\33\\44-model {gap:0}
77+
#la\\{tex\\} {gap:0}
78+
79+
/* SELECTORS > NAMESPACE */
80+
foo|h1 {gap:0}
81+
*|abbr {gap:0}
82+
*|* {gap:0}
83+
foo|* {gap:0}
84+
|[svg|attr=name]{gap:0}
85+
|h1 {gap:0}
86+
*| {gap:0}
87+
*|{gap:0}
88+
89+
90+
/* AT RULES */
91+
92+
/* AT RULES > @CHARSET */
93+
@charset "US-ASCII";
94+
/* Not the first line */\n@charset "UTF-8";
95+
@charset 'US-ASCII';
96+
@charset "iso-8859-15";
97+
@charset"US-ASCII";
98+
@charset "UTF-8" ;
99+
@charset "WTF-8" /* Nope */ ;
100+
/* @charset "UTF-8 */
101+
@CHARSET 'US-ASCII';
102+
103+
/* AT RULES > @IMPORT */
104+
@import url("file.css");
105+
@import "file.css";
106+
@import 'file.css';
107+
@import /* url("name"); */ "1.css";
108+
@import/* Comment */"2.css";
109+
@import"file.css";
110+
@import-file.css;
111+
@import\nurl("file.css");
112+
@import\nurl("file.css");
113+
@import url("1.css") print /* url(";"); */ all;
114+
@import "astral.css" projection;
115+
/* @import url(\'landscape.css\') screen and (orientation:landscape); */
116+
117+
/* AT RULES > @MEDIA */
118+
@media(max-width: 37.5em) { }
119+
@media not print and (max-width: 37.5em){ }
120+
@media (max-device-width: 2px){ }
121+
@media (-webkit-foo: bar){ b{ } }
122+
@media screen and (-ms-high-contrast:black-on-white){ }
123+
@media (_moz-a:b){}
124+
@media (-hp-foo:bar){}
125+
@media (mso-page-size:wide){}
126+
h1 { }@media only screen { } h2 { }
127+
h1 { }@media only screen { }h2 { }
128+
/* @media (min-width >= 0px)\n and (max-width <= 400)\n and (min-height > 400)\n and (max-height < 200) */
129+
@media/* */only/* */screen/* */and (min-width:1100px){}
130+
@media/*=*/(max-width:/**/37.5em)/*=*/and/*=*/(/*=*/min-height/*:*/:/*=*/1.2em/*;*/){}
131+
@media only screen and (min-width : /* 40 */\n 320px),\n not print and (max-width: 480px) /* kek */ and (-webkit-min-device-pixel-ratio /*:*/ : 2),\nonly speech and (min-width: 10em), /* wat */ (-webkit-min-device-pixel-ratio: 2) { }
132+
@media , {}
133+
@media (min-aspect-ratio: 3 / 4) and (max-aspect-ratio: 20 / 17) {}
134+
135+
/* AT RULES > @KEYFRAMES */
136+
@keyframes important1 {\n from { margin-top: 50px;\n margin-bottom: 100px }\n 50% { margin-top: 150px !important; } /* Ignored */\n to { margin-top: 100px; }\n}
137+
/* broke, so removed */
138+
@keyframes Give-them-both { fROm { } To {} }
139+
@keyframes identifier { -50.2% } @keyframes ident2 { .25%}
140+
@keyframes A\\1F602Z {}
141+
142+
/* AT RULES > @SUPPORTS */
143+
@supports (font-size: 1em) { }
144+
@supports not (font-size: 1em){ }\n@supports (font-size: 1em) and (font-size: 1em){ }\n@supports (font-size: 1em) or (font-size: 1em){ }
145+
@supports (--foo: green){}
146+
@supports not ((tab-size:4) or (-moz-tab-size:4)){\n body::before{content: \"Come on, Microsoft (Get it together already)…\"; }\n}
147+
@supports (display:table-cell) or ((display:list-item) and (display:run-in)){}
148+
@supports (animation-name: test) {\n #node {\n animation-name: test;\n }\n body > header[data-name=\"attr\"] ~ *:not(:first-child){\n content: \"😂👌\"\n }\n @keyframes important1 {\n from {\n margin-top: 50px;\n margin-bottom: 100px\n }\n 50% { margin-top: 150px !important; } /* Ignored */\n to { margin-top: 100px; }\n }\n}
149+
@supports/*===*/not/*==****************|\n==*/(display:table-cell)/*============*/ and (display: list-item)/*}*/{}
150+
/* @supports\n (box-shadow: 0 0 2px rgba(0,0,0,.5) inset) or\n (-moz-box-shadow: 0 0 2px black inset) or\n (-webkit-box-shadow: 0 0 2px black inset) or\n (-o-box-shadow: 0 0 2px black inset)\n{ .noticebox { } } */
151+
152+
/* AT RULES > @NAMESPACE */
153+
@namespace "XML";
154+
@namespace prefix "XML" ;
155+
@namespace url("http://a.bc/");
156+
@namespace url url("http://a.bc/");
157+
@namespace/*=*/pre/*=*/"url"/*=*/;
158+
@namespace"XML";
159+
@namespace pre\\ fix "http://url/";
160+
@namespace\nprefix\"XML\";
161+
@namespace\n\n prefix\n\nurl(\"http://a.bc/\");
162+
163+
/* AT RULES > @FONT-FEATURE */
164+
@font-feature-values Font name 2 { }
165+
@font-feature-values\nFont name 2\n{}
166+
@font-feature-values/*{*/Font/*}*/name/*{*/2{}
167+
@swash{ swashy: 2; }\n@ornaments{ ident: 2; }\n@annotation{ ident: 1; }\n@stylistic{ stylish: 2; }\n@styleset{ sets: 2 3 4; }\n@character-variant{ charvar: 2 }
168+
@sWASH{ swashy: 2; }\n@ornaMENts{ ident: 2; }\n@anNOTatION{ ident: 1; }\n@styLISTic{ stylish: 2; }\n@STYLEset{ sets: 2 3 4; }\n@CHARacter-VARiant{ charvar: 2 }
169+
@font-feature-values Font name 2 {\n@swash{/*\n========*/swashy:/**/2;/**/}\n}
170+
@swash{ s\\000077a\\73hy: 1; }
171+
172+
/* AT RULES > @PAGE */
173+
@page :first { }
174+
@page:right{}
175+
@page {}
176+
@page{}
177+
178+
/* AT RULES > @COUNTER-STYLE */
179+
@counter-style winners-list {\n system: fixed;\n symbols: url(gold-medal.svg) url(silver-medal.svg) url(bronze-medal.svg);\n suffix: \" \";\n}
180+
@counter-style/*{*/winners-list/*}*/{ system: fixed; }
181+
@counter-style\nwinners-list {}
182+
@counter-style A\\01F602z {}
183+
184+
/* AT RULES > @DOCUMENT */
185+
/* broke, so removed */
186+
187+
/* AT RULES > @VIEWPORT */
188+
@viewport { min-width: 640px; max-width: 800px; }
189+
@-O-VIEWPORT\n{\n zoom: 0.75;\n min-zoom: 0.5;\n max-zoom: 0.9;\n}
190+
@-ms-viewport/*{*/{/*\n==*/orientation: landscape;\n}
191+
192+
/* AT RULES > UNKNOWN */
193+
/* @foo;\n@foo ;\n@foo a;\n@foo ();\n@foo (a); */
194+
/* @foo bar;\n.foo */
195+
196+
/* CAPITALIZATION */
197+
/* @IMPoRT url(\"file.css\");\n@MEdIA (MAX-WIDTH: 2px){ }\n@pAgE :fIRST { }\n@NAMEspace \"A\";\n@foNT-FacE {} */
198+
a{ COLOR: #fff; }\na{ gRId-tEMPLaTe: none; }\na{ bACkgrOUND-iMAGE: none; }\na{ -MOZ-IMAGE: none; }
199+
a{ color: INItIaL; }\na{ color: trAnsPAREnT; }\na{ color: rED; }\na{ color: unSET; }\na{ color: NONe; }\na{ style: lOWER-lATIN; }\na{ color: -WebkIT-foo; }\na{ font: HelVETica; }
200+
DIV:HOVER { }\n#id::BefORE { }\n#id::aFTEr { }\nTABle:nTH-cHILD(2N+1) {}\nhtML:NOT(.htiml) {}\nI::BACKDROP\nI::-mOZ-thing {}
201+
a{ color: RGBa(); }\na{ color: hslA(); }\na{ color: URL(); }\na{ content: ATTr(); }\na{ content: CoUNTer(); }\na{ content: cuBIC-beZIER()}\na{ content: sTePs()}\na{ content: cALc(2 + 2)}
202+
a{width: 20EM; }\na{width: 20ReM; }\na{width: 8tURN; }\na{width: 20S; }\na{width: 20CM}\na{width: 2gRAd}
203+
204+
/* PSEUDO-CLASSES */
205+
p:first-child {}
206+
p{ left:left }
207+
a:dir(ltr ){ }\n*:dir( rtl){ }
208+
:DIR(/**\n==*/ltr/*\n*/) {}
209+
:lang(zh-Hans-CN,es-419) {}
210+
:lang(zh-*-CN) {}
211+
/* :lang("zh-*-CN",\'*-ab-\') {} */
212+
*:not(.class-name):not(div) {}
213+
*:not(/*(*/.class-name/*)*/):not(/*b*/) {}
214+
:nth-child(2n+1)\n:nth-child(2n -1)\n:nth-child(-2n+ 1)\n:nth-child(-2n - 1)\n:nth-child(odd)\n:nth-child(even)\n:nth-child( odd )\n:nth-child( even ) {}
215+
:nth-last-child(2n)\n:nth-last-child( -2n)\n:nth-last-child( 2n )\n:nth-last-child(even) {}
216+
img:nth-of-type(+n+1)\nimg:nth-of-type(-n+1)\nimg:nth-of-type(n+1) {}
217+
h1:nth-last-of-type(-1)\nh1:nth-last-of-type(+2)\nh1:nth-last-of-type(3) {}
218+
219+
/* PSEUDO-ELEMENTS */
220+
.opening:first-letter {}
221+
q::after {}
222+
:-ms-input-placeholder {}
223+
::-webkit-input-placeholder {}
224+
::selection {}
225+
:selection {}
226+
227+
/* COMPOUND SELECTOR */
228+
very-custom.class
229+
very-custom:hover
230+
very-custom::shadow
231+
232+
/* PROPERTY LISTS */
233+
div { font-size: inherit; }
234+
div{color:inherit;float:left}
235+
very-custom { color: inherit }\nanother-one { display : none ; }
236+
:root { --white: #FFF; }
237+
a{ text-shadow: a, b; }
238+
.test{ width: 20em;;;;;;;;;\n;;;;;;;;;height: 10em; }
239+
p{ color: #f030; }
240+
a{ color: #CAFEBABE; }
241+
/* a{ color: #CAFEBABEF; } */
242+
p { font-family: Verdana, Helvetica, sans-serif; }
243+
ol.myth { list-style-type: cjk-earthly-branch }
244+
div { font-size: 14px; }
245+
div { font-size: test14px; }
246+
div { font-size: test-14px; }
247+
.edge { cursor: -webkit-zoom-in; }
248+
.edge { width: -moz-min-content; }
249+
.edge { display: -ms-grid; }
250+
div { color: var(--primary-color) }
251+
.a { a: 12em }\n.a { a: 4.01ex }\n.a { a: -456.8ch }\n.a { a: 0.0REM }\n.a { a: +0.0vh }\n.a { a: -0.0vw }\n.a { a: .6px }\n.a { a: 10e3mm }\n.a { a: 10E3cm }\n.a { a: -3.4e+2In }\n.a { a: -3.4e-2ch }\n.a { a: +.5E-2% }\n.a { a: -3.4e-2% }
252+
253+
/* FUNCTIONAL NOTATION */
254+
a{content:aTTr(data-width px, inherit)}
255+
a{content:ATTR(VAR(--name) px, "N/A")}
256+
a{\n width: calc(3px + -1em);\n width: calc(3px - -1em);\n width: calc(3px * 2);\n width: calc(3px / 2);\n}
257+
a{ width: calc(3px+1em); }
258+
a{ width: calc(3px--1em); height: calc(10-1em);}
259+
a{ width: calc(3px*2); }
260+
a{ width: calc(3px/2); }
261+
.foo { margin-top: calc(var(--gap) + 1px); }
262+
263+
/* COLORS */
264+
a{ color: rgb(187,255,221); }
265+
a{ color: RGBa( 100%, 0% ,20.17% ,.5 ); }
266+
a{color:HSL(0, 00100%,50%)}
267+
a{color:HSLa(2,.0%,1%,.7)}
268+
a{ color: RGBA(var(--red), 0% , 20%, .2)}
269+
a{ color: rgba(/**/255/*=*/,0,/*2.2%*/51/*,*/0.2)}
270+
.frost{\n background-color: rgba(\n var(--red), /* Red */\n var(--green), /* Green */\n var(--blue), /* Blue */\n /* var(--test),\n /**/var(--opacity) /* Transparency */\n );\n}
271+
272+
/* GRADIENTS */
273+
a{ background-image: linear-gradient( 45deg, blue, red ); }
274+
a{ background-image: LINear-graDIEnt( ellipse to left top, blue, red);
275+
a{ background-image: radial-gradient(farthest-corner at 45px 45px , #f00 0%, #00f 100%);}
276+
a{ background-image: RADial-gradiENT(16px at 60px 50%,#000 0%, #000 14px, rgba(0,0,0,.3) 18px, transparent 19px)}
277+
a{\n background-image: raDIAL-gradiENT(\n ellipse farthest-corner/*@*/at/*@*/470px 47px,/*===\n========*/#FFFF80 20%, rgba(204, 153, 153, 0.4) 30%,/*))))))))}*/#E6E6FF 60%); }
278+
.grad {\n background-image: -webkit-linear-gradient(top, /* For Chrome 25 and Safari 6, iOS 6.1, Android 4.3 */ hsl(0, 80%, 70%), #bada55);\n background-image: -moz-linear-gradient(top, /* For Firefox (3.6 to 15) */ hsl(0, 80%, 70%), #bada55);\n background-image: -o-linear-gradient(top, /* For old Opera (11.1 to 12.0) */ hsl(0, 80%, 70%), #bada55);\n}
279+
.grad {\n background-image: -webkit-gradient(linear, 0% 0%, 0% 100%,\n from( rgb(0, 171, 235)),\n color-stop(0.5, rgb(255, 255, 255)),\n color-stop(0.5, rgb(102, 204, 0)),\n to(rgb(255, 255, 255))),\n -webkit-gradient(radial, 45 45, 10, 52 50, 30, from(#A7D30C), to(rgba(1,159,98,0)), color-stop(90%, #019F62)),\n -webkit-gradient(radial, 105 105, 20, 112 120, 50, from(#ff5f98), to(rgba(255,1,136,0)), color-stop(75%, #ff0188)),\n -webkit-gradient(radial, 95 15, 15, 102 20, 40, from(#00c9ff), to(rgba(0,201,255,0)), color-stop(80%, #00b5e2)),\n -webkit-gradient(radial, 0 150, 50, 0 140, 90, from(#f4f201), to(rgba(228, 199,0,0)), color-stop(80%, #e4c700));\n}
280+
281+
/* OTHER FUNCTIONS */
282+
a{\n shape-outside: circle(20em/*=*/at 50% 50%);\n shape-outside: inset(1em, 1em, 1em, 1em);\n}
283+
.font{\n font-variant-alternates: stylistic(user-defined-ident);\n font-variant-alternates: styleset(user-defined-ident);\n font-variant-alternates: character-variant(user-defined-ident);\n font-variant-alternates: swash(user-defined-ident);\n font-variant-alternates: ornaments(user-defined-ident);\n font-variant-alternates: annotation(user-defined-ident);\n font-variant-alternates: swash(ident1) annotation(ident2);\n}
284+
/* a{\n background-image: image-set( \"foo.png\" 1x,\n \"foo-2x.png\" 2x,\n \"foo-print.png\" 600dpi );\n} */
285+
286+
/* TIMING FUNCTIONS */
287+
a{ zoom: cubic-bezier(/**/1.2,/*=*/0,0,0/**/)}
288+
a{ before: steps(0, start); after: steps(1, end); }
289+
290+
/* VARIABLES */
291+
a{color: var(--name)}
292+
a{color: var( --name )}
293+
a{ color: var( /*=*/ --something ) }
294+
.bar{ width: var(--page-width, /*;;;);*/ 2); }
295+
296+
a{ p: attr (title); }
297+
a{url:url (s)}
298+
a{content:url ("http://github.com/");}
299+
a{content: url (http://a.pl/)}
300+
a{ color: rgb (187,255,221); }
301+
302+
/* UNICODE RANGES */
303+
a{ a: U+A5 }
304+
a{ unicode-range: u+0-7F }
305+
a{ unicode-range: U+4?? }
306+
a{ unicode-range: U+0025-00FF, U+4?? }
307+
308+
/* ESCAPE SEQUENCES */
309+
very-custom { content: '\\c0ffee' }
310+
very-custom { content: "\\c0ffee" }
311+
\\61 \\{ { } \\}
312+
a { \\77\\69\\64\\74\\68: 20px; }
313+
a { content: \\1F764; }
314+
315+
/* UNCLOSED STRINGS */
316+
/* a{ content: 'aaaa */
317+
/* a{ content: "aaaa */
318+
/* a{ content: \"aaaaa\\\\\\\naaa\"; color: red;\n} */
319+
/* a{\n content: 'aaaaa\\\\\\\naaa'; color: red;\n} */
320+
/* a{ content: "aaa\\"aa */
321+
/* a{ content: 'aaa\\'aa */
322+
a{\n content: \"aaa\\\"aa\\\naaaa\naaaa; color: red;\n}
323+
324+
/* COMMENTS */
325+
@import /* url("name"); */ "1.css";
326+
@import/*";"*/ url("2.css");
327+
@import url("3.css") print /* url(";"); */;
328+
@font-face/*"{;}"*/{}
329+
/* comment */ @media {}
330+
@media/* comment */ () {}
331+
@media (max-height: 40em/* comment */) {}
332+
section {border:4px/*padding:1px*/}
333+
section {\n border:4px /*1px;\n padding:1px*/\n}
334+
335+
/* ANIMATIONS */
336+
.animated {\n animation-name: orphan-black;\n animation-name: line-scale;\n}
337+
338+
/* TRANSFORMS */
339+
.transformed {\n transform: matrix(0, 1.5, -1.5, 0, 0, 100px);\n transform: rotate(90deg) translateX(100px) scale(1.5);\n}
340+
341+
/* PERFORMANCE REGRESSIONS */
342+
/* <![CDATA[啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊"= */
343+
/* <body>\n [}~" + ('ÁÂÃÄÅÆÇÈÊËÍÎ'.repeat(100)) + "\n</body> */
344+
345+
/* MISSING SUPPORTED PROPERTIES REGRESSIONS */
346+
a { place-items: center center; }
347+
a { place-self: center center; }
348+
a { place-content: center center; }
349+
a { row-gap: 5px; }

0 commit comments

Comments
 (0)