mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
The start of what will hopefully become a one-stop comprehensive test of all the fun corners of stylesheet parsing. While not intended to replace all the other unit tests for CSS, this test should help to quickly and easily be sure that nothing breaks any valid CSS. Influenced by #1253 and #1836 this code starts the process of implementing the requirement outlined in #1838. Adding more rules -- simple and/or weird -- that are expected and known to parse without a problem is encouraged.
228 lines
2.7 KiB
CSS
228 lines
2.7 KiB
CSS
/*
|
|
* The idea with this stylesheet is that it should contain as many valid
|
|
* ways of styling things as possible. So, as time goes on, feel free to add
|
|
* something to here. Be creative. Do the wildest things you can think of.
|
|
*/
|
|
|
|
* {}
|
|
* * {}
|
|
* * * {}
|
|
* > * {}
|
|
* > * > * {}
|
|
|
|
/**********************************************************************/
|
|
|
|
A {}
|
|
A A {}
|
|
A A A {}
|
|
A > A {}
|
|
A > A > A {}
|
|
|
|
A1 {}
|
|
A1 A1 {}
|
|
A1 A1 A1 {}
|
|
A1 > A1 {}
|
|
A1 > A1 > A1 {}
|
|
|
|
A {}
|
|
A A1 {}
|
|
A A1 A1 {}
|
|
A > A1 {}
|
|
A > A1 > A1 {}
|
|
|
|
A1 {}
|
|
A1 A {}
|
|
A1 A A {}
|
|
A1 > A {}
|
|
A1 > A > A {}
|
|
|
|
/**********************************************************************/
|
|
|
|
A {}
|
|
A, A {}
|
|
A,A {}
|
|
A, A, A {}
|
|
A,A,A {}
|
|
A , A , A {}
|
|
A
|
|
,
|
|
A
|
|
,
|
|
A
|
|
{
|
|
|
|
}
|
|
|
|
A1 {}
|
|
A1, A1 {}
|
|
A1,A1 {}
|
|
A1, A1, A1 {}
|
|
A1,A1,A1 {}
|
|
A1 , A1 , A1 {}
|
|
A1
|
|
,
|
|
A1
|
|
,
|
|
A1
|
|
{
|
|
|
|
}
|
|
|
|
/**********************************************************************/
|
|
|
|
.A {}
|
|
.A .A {}
|
|
.A .A .A {}
|
|
.A > .A {}
|
|
.A > .A > .A {}
|
|
|
|
.A1 {}
|
|
.A1 .A1 {}
|
|
.A1 .A1 .A1 {}
|
|
.A1 > .A1 {}
|
|
.A1 > .A1 > .A1 {}
|
|
|
|
.A1 {}
|
|
.A1 .A {}
|
|
.A1 .A .A {}
|
|
.A1 > .A {}
|
|
.A1 > .A > .A {}
|
|
|
|
.A {}
|
|
.A .A1 {}
|
|
.A .A1 .A1 {}
|
|
.A > .A1 {}
|
|
.A > .A1 > .A1 {}
|
|
|
|
/**********************************************************************/
|
|
|
|
.A {}
|
|
.A.A {}
|
|
.A.A.A {}
|
|
|
|
.A1 {}
|
|
.A1.A1 {}
|
|
.A1.A1.A1 {}
|
|
|
|
.A1 {}
|
|
.A1.A {}
|
|
.A1.A.A {}
|
|
|
|
.A {}
|
|
.A.A1 {}
|
|
.A.A1.A1 {}
|
|
|
|
/**********************************************************************/
|
|
|
|
#A {}
|
|
#A #A {}
|
|
#A #A #A {}
|
|
#A > #A {}
|
|
#A > #A > #A {}
|
|
|
|
#A1 {}
|
|
#A1 #A1 {}
|
|
#A1 #A1 #A1 {}
|
|
#A1 > #A1 {}
|
|
#A1 > #A1 > #A1 {}
|
|
|
|
#A1 {}
|
|
#A1 #A {}
|
|
#A1 #A #A {}
|
|
#A1 > #A {}
|
|
#A1 > #A > #A {}
|
|
|
|
#A {}
|
|
#A #A1 {}
|
|
#A #A1 #A1 {}
|
|
#A > #A1 {}
|
|
#A > #A1 > #A1 {}
|
|
|
|
/**********************************************************************/
|
|
|
|
A:foo {}
|
|
A:foo:bar {}
|
|
A
|
|
:foo {}
|
|
A
|
|
:foo:bar {}
|
|
A
|
|
:foo
|
|
:bar {}
|
|
A:foo-bar {}
|
|
A
|
|
:foo-bar {}
|
|
|
|
A :foo {}
|
|
A :foo :bar {}
|
|
A :foo-bar {}
|
|
|
|
.A:foo {}
|
|
.A:foo:bar {}
|
|
.A
|
|
:foo {}
|
|
.A
|
|
:foo:bar {}
|
|
.A
|
|
:foo
|
|
:bar {}
|
|
.A:foo-bar {}
|
|
.A
|
|
:foo-bar {}
|
|
|
|
#A:foo {}
|
|
#A:foo:bar {}
|
|
#A
|
|
:foo {}
|
|
#A
|
|
:foo:bar {}
|
|
#A
|
|
:foo
|
|
:bar {}
|
|
#A:foo-bar {}
|
|
#A
|
|
:foo-bar {}
|
|
|
|
A1.A1.A1:foo {}
|
|
A1.A1#A1:foo {}
|
|
A1:foo.A1:foo#A1:foo {}
|
|
|
|
/**********************************************************************/
|
|
|
|
$foo:;
|
|
$foo:1;
|
|
$fo1:1;
|
|
$1:1;
|
|
$-:1;
|
|
$--:1;
|
|
$--------------------------------------------------:1;
|
|
$-1:1;
|
|
$--1:1;
|
|
$--------------------------------------------------1:1;
|
|
$_1:1;
|
|
$__1:1;
|
|
$__________________________________________________1:1;
|
|
|
|
/**********************************************************************/
|
|
A{}
|
|
A {
|
|
}
|
|
A {} A {} A {}
|
|
A{}A{}A{}
|
|
A {
|
|
} A {} A {
|
|
}
|
|
A
|
|
{}
|
|
A
|
|
{
|
|
|
|
}
|
|
|
|
/**********************************************************************
|
|
* Don't change or remove this. This class is looked for in the unit
|
|
* test code to make sure that everything parsed.
|
|
*/
|
|
.---we-made-it-to-the-end--- {
|
|
}
|