test(css/parser): Add more tests for the selector parser (#3455)

This commit is contained in:
Alexander Akait 2022-02-05 09:22:32 +03:00 committed by GitHub
parent 38e2ffb929
commit 479b509845
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
33 changed files with 41728 additions and 497 deletions

View File

@ -28,3 +28,13 @@ a[ class = "test" ] {}
[ href *= "insensitive" i ] {}
[ href ] {}
[frame=hsides i] {}
#id.class[target] {}
#id[target] {}
[target].class {}
[title='foo'] {}
[data-style='value'][data-loading] {}
a[href="te's't"] {}
a[href='te"s"t'] {}
[ng\:cloak] {}
[ng\3a cloak] {}
[ng\00003acloak] {}

View File

@ -2,7 +2,7 @@
"type": "Stylesheet",
"span": {
"start": 0,
"end": 590,
"end": 789,
"ctxt": 0
},
"rules": [
@ -2405,6 +2405,882 @@
},
"value": []
}
},
{
"type": "QualifiedRule",
"span": {
"start": 589,
"end": 609,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 589,
"end": 606,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 589,
"end": 606,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 589,
"end": 606,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "IdSelector",
"span": {
"start": 589,
"end": 592,
"ctxt": 0
},
"text": {
"type": "Identifier",
"span": {
"start": 589,
"end": 592,
"ctxt": 0
},
"value": "id",
"raw": "id"
}
},
{
"type": "ClassSelector",
"span": {
"start": 592,
"end": 598,
"ctxt": 0
},
"text": {
"type": "Identifier",
"span": {
"start": 593,
"end": 598,
"ctxt": 0
},
"value": "class",
"raw": "class"
}
},
{
"type": "AttributeSelector",
"span": {
"start": 598,
"end": 606,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 599,
"end": 605,
"ctxt": 0
},
"value": "target",
"raw": "target"
},
"matcher": null,
"value": null,
"modifier": null
}
]
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 607,
"end": 609,
"ctxt": 0
},
"value": []
}
},
{
"type": "QualifiedRule",
"span": {
"start": 610,
"end": 624,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 610,
"end": 621,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 610,
"end": 621,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 610,
"end": 621,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "IdSelector",
"span": {
"start": 610,
"end": 613,
"ctxt": 0
},
"text": {
"type": "Identifier",
"span": {
"start": 610,
"end": 613,
"ctxt": 0
},
"value": "id",
"raw": "id"
}
},
{
"type": "AttributeSelector",
"span": {
"start": 613,
"end": 621,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 614,
"end": 620,
"ctxt": 0
},
"value": "target",
"raw": "target"
},
"matcher": null,
"value": null,
"modifier": null
}
]
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 622,
"end": 624,
"ctxt": 0
},
"value": []
}
},
{
"type": "QualifiedRule",
"span": {
"start": 625,
"end": 642,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 625,
"end": 639,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 625,
"end": 639,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 625,
"end": 639,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "AttributeSelector",
"span": {
"start": 625,
"end": 633,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 626,
"end": 632,
"ctxt": 0
},
"value": "target",
"raw": "target"
},
"matcher": null,
"value": null,
"modifier": null
},
{
"type": "ClassSelector",
"span": {
"start": 633,
"end": 639,
"ctxt": 0
},
"text": {
"type": "Identifier",
"span": {
"start": 634,
"end": 639,
"ctxt": 0
},
"value": "class",
"raw": "class"
}
}
]
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 640,
"end": 642,
"ctxt": 0
},
"value": []
}
},
{
"type": "QualifiedRule",
"span": {
"start": 643,
"end": 659,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 643,
"end": 656,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 643,
"end": 656,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 643,
"end": 656,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "AttributeSelector",
"span": {
"start": 643,
"end": 656,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 644,
"end": 649,
"ctxt": 0
},
"value": "title",
"raw": "title"
},
"matcher": "=",
"value": {
"type": "String",
"span": {
"start": 650,
"end": 655,
"ctxt": 0
},
"value": "foo",
"raw": "'foo'"
},
"modifier": null
}
]
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 657,
"end": 659,
"ctxt": 0
},
"value": []
}
},
{
"type": "QualifiedRule",
"span": {
"start": 660,
"end": 697,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 660,
"end": 694,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 660,
"end": 694,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 660,
"end": 694,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "AttributeSelector",
"span": {
"start": 660,
"end": 680,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 661,
"end": 671,
"ctxt": 0
},
"value": "data-style",
"raw": "data-style"
},
"matcher": "=",
"value": {
"type": "String",
"span": {
"start": 672,
"end": 679,
"ctxt": 0
},
"value": "value",
"raw": "'value'"
},
"modifier": null
},
{
"type": "AttributeSelector",
"span": {
"start": 680,
"end": 694,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 681,
"end": 693,
"ctxt": 0
},
"value": "data-loading",
"raw": "data-loading"
},
"matcher": null,
"value": null,
"modifier": null
}
]
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 695,
"end": 697,
"ctxt": 0
},
"value": []
}
},
{
"type": "QualifiedRule",
"span": {
"start": 698,
"end": 717,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 698,
"end": 714,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 698,
"end": 714,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 698,
"end": 714,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TypeSelector",
"span": {
"start": 698,
"end": 699,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 698,
"end": 699,
"ctxt": 0
},
"value": "a",
"raw": "a"
}
},
"subclassSelectors": [
{
"type": "AttributeSelector",
"span": {
"start": 699,
"end": 714,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 700,
"end": 704,
"ctxt": 0
},
"value": "href",
"raw": "href"
},
"matcher": "=",
"value": {
"type": "String",
"span": {
"start": 705,
"end": 713,
"ctxt": 0
},
"value": "te's't",
"raw": "\"te's't\""
},
"modifier": null
}
]
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 715,
"end": 717,
"ctxt": 0
},
"value": []
}
},
{
"type": "QualifiedRule",
"span": {
"start": 718,
"end": 737,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 718,
"end": 734,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 718,
"end": 734,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 718,
"end": 734,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TypeSelector",
"span": {
"start": 718,
"end": 719,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 718,
"end": 719,
"ctxt": 0
},
"value": "a",
"raw": "a"
}
},
"subclassSelectors": [
{
"type": "AttributeSelector",
"span": {
"start": 719,
"end": 734,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 720,
"end": 724,
"ctxt": 0
},
"value": "href",
"raw": "href"
},
"matcher": "=",
"value": {
"type": "String",
"span": {
"start": 725,
"end": 733,
"ctxt": 0
},
"value": "te\"s\"t",
"raw": "'te\"s\"t'"
},
"modifier": null
}
]
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 735,
"end": 737,
"ctxt": 0
},
"value": []
}
},
{
"type": "QualifiedRule",
"span": {
"start": 738,
"end": 752,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 738,
"end": 749,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 738,
"end": 749,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 738,
"end": 749,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "AttributeSelector",
"span": {
"start": 738,
"end": 749,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 739,
"end": 748,
"ctxt": 0
},
"value": "ng:cloak",
"raw": "ng\\:cloak"
},
"matcher": null,
"value": null,
"modifier": null
}
]
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 750,
"end": 752,
"ctxt": 0
},
"value": []
}
},
{
"type": "QualifiedRule",
"span": {
"start": 753,
"end": 769,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 753,
"end": 766,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 753,
"end": 766,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 753,
"end": 766,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "AttributeSelector",
"span": {
"start": 753,
"end": 766,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 754,
"end": 765,
"ctxt": 0
},
"value": "ng:cloak",
"raw": "ng\\3a cloak"
},
"matcher": null,
"value": null,
"modifier": null
}
]
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 767,
"end": 769,
"ctxt": 0
},
"value": []
}
},
{
"type": "QualifiedRule",
"span": {
"start": 770,
"end": 789,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 770,
"end": 786,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 770,
"end": 786,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 770,
"end": 786,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "AttributeSelector",
"span": {
"start": 770,
"end": 786,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 771,
"end": 785,
"ctxt": 0
},
"value": "ng:cloak",
"raw": "ng\\00003acloak"
},
"matcher": null,
"value": null,
"modifier": null
}
]
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 787,
"end": 789,
"ctxt": 0
},
"value": []
}
}
]
}

View File

@ -6,9 +6,9 @@ error: Stylesheet
3 | | [title="foo"] {}
4 | | [ title = "foo" ] {}
... |
29 | | [ href ] {}
30 | | [frame=hsides i] {}
| |_____________________^
39 | | [ng\3a cloak] {}
40 | | [ng\00003acloak] {}
| |___________________^
error: Rule
--> $DIR/tests/fixture/selector/attribute/input.css:1:1
@ -1810,3 +1810,681 @@ error: Block
30 | [frame=hsides i] {}
| ^^
error: Rule
--> $DIR/tests/fixture/selector/attribute/input.css:31:1
|
31 | #id.class[target] {}
| ^^^^^^^^^^^^^^^^^^^^
error: QualifiedRule
--> $DIR/tests/fixture/selector/attribute/input.css:31:1
|
31 | #id.class[target] {}
| ^^^^^^^^^^^^^^^^^^^^
error: SelectorList
--> $DIR/tests/fixture/selector/attribute/input.css:31:1
|
31 | #id.class[target] {}
| ^^^^^^^^^^^^^^^^^
error: ComplexSelector
--> $DIR/tests/fixture/selector/attribute/input.css:31:1
|
31 | #id.class[target] {}
| ^^^^^^^^^^^^^^^^^
error: CompoundSelector
--> $DIR/tests/fixture/selector/attribute/input.css:31:1
|
31 | #id.class[target] {}
| ^^^^^^^^^^^^^^^^^
error: SubclassSelector
--> $DIR/tests/fixture/selector/attribute/input.css:31:1
|
31 | #id.class[target] {}
| ^^^
error: IdSelector
--> $DIR/tests/fixture/selector/attribute/input.css:31:1
|
31 | #id.class[target] {}
| ^^^
error: Ident
--> $DIR/tests/fixture/selector/attribute/input.css:31:1
|
31 | #id.class[target] {}
| ^^^
error: SubclassSelector
--> $DIR/tests/fixture/selector/attribute/input.css:31:4
|
31 | #id.class[target] {}
| ^^^^^^
error: ClassSelector
--> $DIR/tests/fixture/selector/attribute/input.css:31:4
|
31 | #id.class[target] {}
| ^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/attribute/input.css:31:5
|
31 | #id.class[target] {}
| ^^^^^
error: SubclassSelector
--> $DIR/tests/fixture/selector/attribute/input.css:31:10
|
31 | #id.class[target] {}
| ^^^^^^^^
error: AttrSelector
--> $DIR/tests/fixture/selector/attribute/input.css:31:10
|
31 | #id.class[target] {}
| ^^^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/attribute/input.css:31:11
|
31 | #id.class[target] {}
| ^^^^^^
error: Block
--> $DIR/tests/fixture/selector/attribute/input.css:31:19
|
31 | #id.class[target] {}
| ^^
error: Rule
--> $DIR/tests/fixture/selector/attribute/input.css:32:1
|
32 | #id[target] {}
| ^^^^^^^^^^^^^^
error: QualifiedRule
--> $DIR/tests/fixture/selector/attribute/input.css:32:1
|
32 | #id[target] {}
| ^^^^^^^^^^^^^^
error: SelectorList
--> $DIR/tests/fixture/selector/attribute/input.css:32:1
|
32 | #id[target] {}
| ^^^^^^^^^^^
error: ComplexSelector
--> $DIR/tests/fixture/selector/attribute/input.css:32:1
|
32 | #id[target] {}
| ^^^^^^^^^^^
error: CompoundSelector
--> $DIR/tests/fixture/selector/attribute/input.css:32:1
|
32 | #id[target] {}
| ^^^^^^^^^^^
error: SubclassSelector
--> $DIR/tests/fixture/selector/attribute/input.css:32:1
|
32 | #id[target] {}
| ^^^
error: IdSelector
--> $DIR/tests/fixture/selector/attribute/input.css:32:1
|
32 | #id[target] {}
| ^^^
error: Ident
--> $DIR/tests/fixture/selector/attribute/input.css:32:1
|
32 | #id[target] {}
| ^^^
error: SubclassSelector
--> $DIR/tests/fixture/selector/attribute/input.css:32:4
|
32 | #id[target] {}
| ^^^^^^^^
error: AttrSelector
--> $DIR/tests/fixture/selector/attribute/input.css:32:4
|
32 | #id[target] {}
| ^^^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/attribute/input.css:32:5
|
32 | #id[target] {}
| ^^^^^^
error: Block
--> $DIR/tests/fixture/selector/attribute/input.css:32:13
|
32 | #id[target] {}
| ^^
error: Rule
--> $DIR/tests/fixture/selector/attribute/input.css:33:1
|
33 | [target].class {}
| ^^^^^^^^^^^^^^^^^
error: QualifiedRule
--> $DIR/tests/fixture/selector/attribute/input.css:33:1
|
33 | [target].class {}
| ^^^^^^^^^^^^^^^^^
error: SelectorList
--> $DIR/tests/fixture/selector/attribute/input.css:33:1
|
33 | [target].class {}
| ^^^^^^^^^^^^^^
error: ComplexSelector
--> $DIR/tests/fixture/selector/attribute/input.css:33:1
|
33 | [target].class {}
| ^^^^^^^^^^^^^^
error: CompoundSelector
--> $DIR/tests/fixture/selector/attribute/input.css:33:1
|
33 | [target].class {}
| ^^^^^^^^^^^^^^
error: SubclassSelector
--> $DIR/tests/fixture/selector/attribute/input.css:33:1
|
33 | [target].class {}
| ^^^^^^^^
error: AttrSelector
--> $DIR/tests/fixture/selector/attribute/input.css:33:1
|
33 | [target].class {}
| ^^^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/attribute/input.css:33:2
|
33 | [target].class {}
| ^^^^^^
error: SubclassSelector
--> $DIR/tests/fixture/selector/attribute/input.css:33:9
|
33 | [target].class {}
| ^^^^^^
error: ClassSelector
--> $DIR/tests/fixture/selector/attribute/input.css:33:9
|
33 | [target].class {}
| ^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/attribute/input.css:33:10
|
33 | [target].class {}
| ^^^^^
error: Block
--> $DIR/tests/fixture/selector/attribute/input.css:33:16
|
33 | [target].class {}
| ^^
error: Rule
--> $DIR/tests/fixture/selector/attribute/input.css:34:1
|
34 | [title='foo'] {}
| ^^^^^^^^^^^^^^^^
error: QualifiedRule
--> $DIR/tests/fixture/selector/attribute/input.css:34:1
|
34 | [title='foo'] {}
| ^^^^^^^^^^^^^^^^
error: SelectorList
--> $DIR/tests/fixture/selector/attribute/input.css:34:1
|
34 | [title='foo'] {}
| ^^^^^^^^^^^^^
error: ComplexSelector
--> $DIR/tests/fixture/selector/attribute/input.css:34:1
|
34 | [title='foo'] {}
| ^^^^^^^^^^^^^
error: CompoundSelector
--> $DIR/tests/fixture/selector/attribute/input.css:34:1
|
34 | [title='foo'] {}
| ^^^^^^^^^^^^^
error: SubclassSelector
--> $DIR/tests/fixture/selector/attribute/input.css:34:1
|
34 | [title='foo'] {}
| ^^^^^^^^^^^^^
error: AttrSelector
--> $DIR/tests/fixture/selector/attribute/input.css:34:1
|
34 | [title='foo'] {}
| ^^^^^^^^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/attribute/input.css:34:2
|
34 | [title='foo'] {}
| ^^^^^
error: Str
--> $DIR/tests/fixture/selector/attribute/input.css:34:8
|
34 | [title='foo'] {}
| ^^^^^
error: Block
--> $DIR/tests/fixture/selector/attribute/input.css:34:15
|
34 | [title='foo'] {}
| ^^
error: Rule
--> $DIR/tests/fixture/selector/attribute/input.css:35:1
|
35 | [data-style='value'][data-loading] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: QualifiedRule
--> $DIR/tests/fixture/selector/attribute/input.css:35:1
|
35 | [data-style='value'][data-loading] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: SelectorList
--> $DIR/tests/fixture/selector/attribute/input.css:35:1
|
35 | [data-style='value'][data-loading] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: ComplexSelector
--> $DIR/tests/fixture/selector/attribute/input.css:35:1
|
35 | [data-style='value'][data-loading] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: CompoundSelector
--> $DIR/tests/fixture/selector/attribute/input.css:35:1
|
35 | [data-style='value'][data-loading] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: SubclassSelector
--> $DIR/tests/fixture/selector/attribute/input.css:35:1
|
35 | [data-style='value'][data-loading] {}
| ^^^^^^^^^^^^^^^^^^^^
error: AttrSelector
--> $DIR/tests/fixture/selector/attribute/input.css:35:1
|
35 | [data-style='value'][data-loading] {}
| ^^^^^^^^^^^^^^^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/attribute/input.css:35:2
|
35 | [data-style='value'][data-loading] {}
| ^^^^^^^^^^
error: Str
--> $DIR/tests/fixture/selector/attribute/input.css:35:13
|
35 | [data-style='value'][data-loading] {}
| ^^^^^^^
error: SubclassSelector
--> $DIR/tests/fixture/selector/attribute/input.css:35:21
|
35 | [data-style='value'][data-loading] {}
| ^^^^^^^^^^^^^^
error: AttrSelector
--> $DIR/tests/fixture/selector/attribute/input.css:35:21
|
35 | [data-style='value'][data-loading] {}
| ^^^^^^^^^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/attribute/input.css:35:22
|
35 | [data-style='value'][data-loading] {}
| ^^^^^^^^^^^^
error: Block
--> $DIR/tests/fixture/selector/attribute/input.css:35:36
|
35 | [data-style='value'][data-loading] {}
| ^^
error: Rule
--> $DIR/tests/fixture/selector/attribute/input.css:36:1
|
36 | a[href="te's't"] {}
| ^^^^^^^^^^^^^^^^^^^
error: QualifiedRule
--> $DIR/tests/fixture/selector/attribute/input.css:36:1
|
36 | a[href="te's't"] {}
| ^^^^^^^^^^^^^^^^^^^
error: SelectorList
--> $DIR/tests/fixture/selector/attribute/input.css:36:1
|
36 | a[href="te's't"] {}
| ^^^^^^^^^^^^^^^^
error: ComplexSelector
--> $DIR/tests/fixture/selector/attribute/input.css:36:1
|
36 | a[href="te's't"] {}
| ^^^^^^^^^^^^^^^^
error: CompoundSelector
--> $DIR/tests/fixture/selector/attribute/input.css:36:1
|
36 | a[href="te's't"] {}
| ^^^^^^^^^^^^^^^^
error: TypeSelector
--> $DIR/tests/fixture/selector/attribute/input.css:36:1
|
36 | a[href="te's't"] {}
| ^
error: Ident
--> $DIR/tests/fixture/selector/attribute/input.css:36:1
|
36 | a[href="te's't"] {}
| ^
error: SubclassSelector
--> $DIR/tests/fixture/selector/attribute/input.css:36:2
|
36 | a[href="te's't"] {}
| ^^^^^^^^^^^^^^^
error: AttrSelector
--> $DIR/tests/fixture/selector/attribute/input.css:36:2
|
36 | a[href="te's't"] {}
| ^^^^^^^^^^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/attribute/input.css:36:3
|
36 | a[href="te's't"] {}
| ^^^^
error: Str
--> $DIR/tests/fixture/selector/attribute/input.css:36:8
|
36 | a[href="te's't"] {}
| ^^^^^^^^
error: Block
--> $DIR/tests/fixture/selector/attribute/input.css:36:18
|
36 | a[href="te's't"] {}
| ^^
error: Rule
--> $DIR/tests/fixture/selector/attribute/input.css:37:1
|
37 | a[href='te"s"t'] {}
| ^^^^^^^^^^^^^^^^^^^
error: QualifiedRule
--> $DIR/tests/fixture/selector/attribute/input.css:37:1
|
37 | a[href='te"s"t'] {}
| ^^^^^^^^^^^^^^^^^^^
error: SelectorList
--> $DIR/tests/fixture/selector/attribute/input.css:37:1
|
37 | a[href='te"s"t'] {}
| ^^^^^^^^^^^^^^^^
error: ComplexSelector
--> $DIR/tests/fixture/selector/attribute/input.css:37:1
|
37 | a[href='te"s"t'] {}
| ^^^^^^^^^^^^^^^^
error: CompoundSelector
--> $DIR/tests/fixture/selector/attribute/input.css:37:1
|
37 | a[href='te"s"t'] {}
| ^^^^^^^^^^^^^^^^
error: TypeSelector
--> $DIR/tests/fixture/selector/attribute/input.css:37:1
|
37 | a[href='te"s"t'] {}
| ^
error: Ident
--> $DIR/tests/fixture/selector/attribute/input.css:37:1
|
37 | a[href='te"s"t'] {}
| ^
error: SubclassSelector
--> $DIR/tests/fixture/selector/attribute/input.css:37:2
|
37 | a[href='te"s"t'] {}
| ^^^^^^^^^^^^^^^
error: AttrSelector
--> $DIR/tests/fixture/selector/attribute/input.css:37:2
|
37 | a[href='te"s"t'] {}
| ^^^^^^^^^^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/attribute/input.css:37:3
|
37 | a[href='te"s"t'] {}
| ^^^^
error: Str
--> $DIR/tests/fixture/selector/attribute/input.css:37:8
|
37 | a[href='te"s"t'] {}
| ^^^^^^^^
error: Block
--> $DIR/tests/fixture/selector/attribute/input.css:37:18
|
37 | a[href='te"s"t'] {}
| ^^
error: Rule
--> $DIR/tests/fixture/selector/attribute/input.css:38:1
|
38 | [ng\:cloak] {}
| ^^^^^^^^^^^^^^
error: QualifiedRule
--> $DIR/tests/fixture/selector/attribute/input.css:38:1
|
38 | [ng\:cloak] {}
| ^^^^^^^^^^^^^^
error: SelectorList
--> $DIR/tests/fixture/selector/attribute/input.css:38:1
|
38 | [ng\:cloak] {}
| ^^^^^^^^^^^
error: ComplexSelector
--> $DIR/tests/fixture/selector/attribute/input.css:38:1
|
38 | [ng\:cloak] {}
| ^^^^^^^^^^^
error: CompoundSelector
--> $DIR/tests/fixture/selector/attribute/input.css:38:1
|
38 | [ng\:cloak] {}
| ^^^^^^^^^^^
error: SubclassSelector
--> $DIR/tests/fixture/selector/attribute/input.css:38:1
|
38 | [ng\:cloak] {}
| ^^^^^^^^^^^
error: AttrSelector
--> $DIR/tests/fixture/selector/attribute/input.css:38:1
|
38 | [ng\:cloak] {}
| ^^^^^^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/attribute/input.css:38:2
|
38 | [ng\:cloak] {}
| ^^^^^^^^^
error: Block
--> $DIR/tests/fixture/selector/attribute/input.css:38:13
|
38 | [ng\:cloak] {}
| ^^
error: Rule
--> $DIR/tests/fixture/selector/attribute/input.css:39:1
|
39 | [ng\3a cloak] {}
| ^^^^^^^^^^^^^^^^
error: QualifiedRule
--> $DIR/tests/fixture/selector/attribute/input.css:39:1
|
39 | [ng\3a cloak] {}
| ^^^^^^^^^^^^^^^^
error: SelectorList
--> $DIR/tests/fixture/selector/attribute/input.css:39:1
|
39 | [ng\3a cloak] {}
| ^^^^^^^^^^^^^
error: ComplexSelector
--> $DIR/tests/fixture/selector/attribute/input.css:39:1
|
39 | [ng\3a cloak] {}
| ^^^^^^^^^^^^^
error: CompoundSelector
--> $DIR/tests/fixture/selector/attribute/input.css:39:1
|
39 | [ng\3a cloak] {}
| ^^^^^^^^^^^^^
error: SubclassSelector
--> $DIR/tests/fixture/selector/attribute/input.css:39:1
|
39 | [ng\3a cloak] {}
| ^^^^^^^^^^^^^
error: AttrSelector
--> $DIR/tests/fixture/selector/attribute/input.css:39:1
|
39 | [ng\3a cloak] {}
| ^^^^^^^^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/attribute/input.css:39:2
|
39 | [ng\3a cloak] {}
| ^^^^^^^^^^^
error: Block
--> $DIR/tests/fixture/selector/attribute/input.css:39:15
|
39 | [ng\3a cloak] {}
| ^^
error: Rule
--> $DIR/tests/fixture/selector/attribute/input.css:40:1
|
40 | [ng\00003acloak] {}
| ^^^^^^^^^^^^^^^^^^^
error: QualifiedRule
--> $DIR/tests/fixture/selector/attribute/input.css:40:1
|
40 | [ng\00003acloak] {}
| ^^^^^^^^^^^^^^^^^^^
error: SelectorList
--> $DIR/tests/fixture/selector/attribute/input.css:40:1
|
40 | [ng\00003acloak] {}
| ^^^^^^^^^^^^^^^^
error: ComplexSelector
--> $DIR/tests/fixture/selector/attribute/input.css:40:1
|
40 | [ng\00003acloak] {}
| ^^^^^^^^^^^^^^^^
error: CompoundSelector
--> $DIR/tests/fixture/selector/attribute/input.css:40:1
|
40 | [ng\00003acloak] {}
| ^^^^^^^^^^^^^^^^
error: SubclassSelector
--> $DIR/tests/fixture/selector/attribute/input.css:40:1
|
40 | [ng\00003acloak] {}
| ^^^^^^^^^^^^^^^^
error: AttrSelector
--> $DIR/tests/fixture/selector/attribute/input.css:40:1
|
40 | [ng\00003acloak] {}
| ^^^^^^^^^^^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/attribute/input.css:40:2
|
40 | [ng\00003acloak] {}
| ^^^^^^^^^^^^^^
error: Block
--> $DIR/tests/fixture/selector/attribute/input.css:40:18
|
40 | [ng\00003acloak] {}
| ^^

View File

@ -35,3 +35,23 @@
.f\+o\+o {}
.-a-b-c- {}
.\#fake-id {}
foo.class > .foo.class {}
.foo#id {}
.class[target] {}
.class#id[target] {}
ul.list {}
ul.list::before {}
.\31 a2b3c {}
.\<\>\<\<\<\>\>\<\> {}
.\31 23 {}
.\# {}
.\#\# {}
.\#fake\-id {}
.foo\.bar {}
.\3A hover {}
.\3A hover\3A focus\3A active {}
.\[attr\=value\] {}
.not-pseudo\:focus {}
.not-pseudo\:\:focus {}
.\\1D306 {}
.\; {}

File diff suppressed because it is too large Load Diff

View File

@ -1,152 +0,0 @@
{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 19,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 0,
"end": 19,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 0,
"end": 14,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 14,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 7,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TypeSelector",
"span": {
"start": 0,
"end": 7,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 0,
"end": 7,
"ctxt": 0
},
"value": "article",
"raw": "article"
}
},
"subclassSelectors": []
},
{
"type": "Combinator",
"span": {
"start": 7,
"end": 10,
"ctxt": 0
},
"value": " "
},
{
"type": "CompoundSelector",
"span": {
"start": 10,
"end": 11,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TypeSelector",
"span": {
"start": 10,
"end": 11,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 10,
"end": 11,
"ctxt": 0
},
"value": "p",
"raw": "p"
}
},
"subclassSelectors": []
},
{
"type": "Combinator",
"span": {
"start": 11,
"end": 13,
"ctxt": 0
},
"value": " "
},
{
"type": "CompoundSelector",
"span": {
"start": 13,
"end": 14,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TypeSelector",
"span": {
"start": 13,
"end": 14,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 13,
"end": 14,
"ctxt": 0
},
"value": "p",
"raw": "p"
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 17,
"end": 19,
"ctxt": 0
},
"value": []
}
}
]
}

View File

@ -1,102 +0,0 @@
error: Stylesheet
--> $DIR/tests/fixture/selector/combinators/input.css:1:1
|
1 | article p p {}
| ^^^^^^^^^^^^^^^^^^^
error: Rule
--> $DIR/tests/fixture/selector/combinators/input.css:1:1
|
1 | article p p {}
| ^^^^^^^^^^^^^^^^^^^
error: QualifiedRule
--> $DIR/tests/fixture/selector/combinators/input.css:1:1
|
1 | article p p {}
| ^^^^^^^^^^^^^^^^^^^
error: SelectorList
--> $DIR/tests/fixture/selector/combinators/input.css:1:1
|
1 | article p p {}
| ^^^^^^^^^^^^^^
error: ComplexSelector
--> $DIR/tests/fixture/selector/combinators/input.css:1:1
|
1 | article p p {}
| ^^^^^^^^^^^^^^
error: CompoundSelector
--> $DIR/tests/fixture/selector/combinators/input.css:1:1
|
1 | article p p {}
| ^^^^^^^
error: TypeSelector
--> $DIR/tests/fixture/selector/combinators/input.css:1:1
|
1 | article p p {}
| ^^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/combinators/input.css:1:1
|
1 | article p p {}
| ^^^^^^^
error: Combinator
--> $DIR/tests/fixture/selector/combinators/input.css:1:8
|
1 | article p p {}
| ^^^
error: CompoundSelector
--> $DIR/tests/fixture/selector/combinators/input.css:1:11
|
1 | article p p {}
| ^
error: TypeSelector
--> $DIR/tests/fixture/selector/combinators/input.css:1:11
|
1 | article p p {}
| ^
error: Ident
--> $DIR/tests/fixture/selector/combinators/input.css:1:11
|
1 | article p p {}
| ^
error: Combinator
--> $DIR/tests/fixture/selector/combinators/input.css:1:12
|
1 | article p p {}
| ^^
error: CompoundSelector
--> $DIR/tests/fixture/selector/combinators/input.css:1:14
|
1 | article p p {}
| ^
error: TypeSelector
--> $DIR/tests/fixture/selector/combinators/input.css:1:14
|
1 | article p p {}
| ^
error: Ident
--> $DIR/tests/fixture/selector/combinators/input.css:1:14
|
1 | article p p {}
| ^
error: Block
--> $DIR/tests/fixture/selector/combinators/input.css:1:18
|
1 | article p p {}
| ^^

View File

@ -0,0 +1,98 @@
article p {}
article
p {}
article p {}
article > p {}
article
>
p {}
article > p {}
p + img {}
p
+
img {}
p + img {}
p ~ img {}
p
~
img {}
p ~ img {}
article > p > a {}
article
>
p
>
a {}
div p {}
.class p {}
div .class {}
.class .class {}
#id p {}
div #id {}
#id #id {}
[attribute] p {}
div [attribute] {}
[attribute] [src] {}
div > p {}
.class > p {}
div > .class {}
.class > .class {}
#id > p {}
div > #id {}
#id > #id {}
[attribute] > p {}
div > [attribute] {}
[attribute] > [src] {}
div + p {}
.class + p {}
div + .class {}
.class + .class {}
#id + p {}
div + #id {}
#id + #id {}
[attribute] + p {}
div + [attribute] {}
[attribute] + [src] {}
div ~ p {}
.class ~ p {}
div ~ .class {}
.class ~ .class {}
#id ~ p {}
div ~ #id {}
#id ~ #id {}
[attribute] ~ p {}
div ~ [attribute] {}
[attribute] ~ [src] {}
a:hover [attribute] {}
a:hover #id {}
a:hover .class {}
a:hover div#thing {}
a + a[href='place'] {}
ul.list + a {}
.foo ~ a + bar {}
a+ a {}
a> a {}
a~ a {}
a +a {}
a >a {}
a ~a {}
a+a {}
a>a {}
a~a {}
a [type='button'] {}
a
[type='button'] {}
a a {}
namespace|type#id > .foo {}
#id > .cl + .cl2 {}
a c, d + e h {}
a ~ h + d {}
div div div div div div div div div div div {}
[href][class][name] h1 > h2 {}
[href*="test.com"][rel='external'][id][class~="test"] > [name] {}
[data-weird-attr*="Something=weird"], [data-weird-attr^="Something=weird"], [data-weird-attr$="Something=weird"], [data-weird-attr|="Something=weird"] {}
* + * {}
* * {}
* * {}
*[href] *:not(*.green) {}
*::-webkit-media-controls-play-button {}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,16 @@
.one {}
.foo.bar {}
.foo#id {}
.class[target] {}
.class#id[target] {}
#id.class {}
#id.class[target] {}
div#thing:hover {}
div#thing::before {}
a[href='place']:hover {}
a[href='place']::before {}
.one.two.three {}
button.btn-primary {}
*#z98y {}
#one#two {}
#one.two.three {}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -33,3 +33,40 @@
#f\'o\'o {}
#f\~o\~o {}
#f\+o\+o {}
#id {}
#id.class {}
#id.class[target] {}
div#thing:hover {}
div#thing:nth-child(2n+1) {}
div#thing::before {}
#foo[lang^=en] {}
#\; {}
#u-m\00002b {}
# {}
# {}
# {}
#\@ {}
#\. {}
#\3A \) {}
#\3A \`\( {}
#\31 23 {}
#\31 a2b3c {}
#\<p\> {}
#\<\>\<\<\<\>\>\<\> {}
#\# {}
#\#\# {}
#\#\.\#\.\# {}
#\_ {}
#\{\} {}
#\.fake\-class {}
#foo\.bar {}
#\3A hover {}
#\3A hover\3A focus\3A active {}
#\[attr\=value\] {}
#f\/o\/o {}
#f\\o\\o {}
#f\*o\*o {}
#f\!o\!o {}
#f\\\'o\\\'o {}
#f\~o\~o {}
#f\+o\+o {}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,23 @@
div, p {}
div , p {}
div , p {}
a, a[href='place'] {}
a #foo > [foo='bar'], .FOO {}
div, p, a {}
div,p,a{}
div , p , a {}
div
,
p
,
a
{}
.foo, .bar, *.baz {}
input::-moz-placeholder, input::placeholder {}
a,b,c,d,e,f,g {}
a, b, c, d, e, f, g {}
*, * {}
#id, #id2 {}
h1, h2 {}
.class, .foo {}
[attr], [attrtoo] {}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,19 @@
:root {}
:any-link {}
button:hover {}
div\:before {}
div\::before {}
iNpUt {}
:matches(section, article, aside, nav) h1 {}
input:not([type='submit']) {}
div.sidebar:has(*:nth-child(5)):not(:has(*:nth-child(6))) {}
::-webkit-scrollbar-thumb:window-inactive {}
::-webkit-scrollbar-button:horizontal:decrement {}
.test::-webkit-scrollbar-button:horizontal:decrement {}
*:is(*) {}
:--heading {}
a:-moz-placeholder {}
a:hover::before {}
div :nth-child(2) {}
a:hOvEr {}
:-webkit-full-screen a {}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -28,3 +28,10 @@ tabbed-custom-element::part(tab) {}
::target-text {}
.form-range::-webkit-slider-thumb:active {}
a::bEfOrE {}
a:hover::before {}
a:hover::-moz-placeholder {}
a, b > .foo::before {}
*:hover.class {}

View File

@ -2,7 +2,7 @@
"type": "Stylesheet",
"span": {
"start": 0,
"end": 355,
"end": 458,
"ctxt": 0
},
"rules": [
@ -1452,6 +1452,569 @@
},
"value": []
}
},
{
"type": "QualifiedRule",
"span": {
"start": 356,
"end": 368,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 356,
"end": 365,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 356,
"end": 365,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 356,
"end": 365,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TypeSelector",
"span": {
"start": 356,
"end": 357,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 356,
"end": 357,
"ctxt": 0
},
"value": "a",
"raw": "a"
}
},
"subclassSelectors": [
{
"type": "PseudoElementSelector",
"span": {
"start": 357,
"end": 365,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 359,
"end": 365,
"ctxt": 0
},
"value": "bEfOrE",
"raw": "bEfOrE"
},
"children": null
}
]
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 366,
"end": 368,
"ctxt": 0
},
"value": []
}
},
{
"type": "QualifiedRule",
"span": {
"start": 370,
"end": 388,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 370,
"end": 385,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 370,
"end": 385,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 370,
"end": 385,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TypeSelector",
"span": {
"start": 370,
"end": 371,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 370,
"end": 371,
"ctxt": 0
},
"value": "a",
"raw": "a"
}
},
"subclassSelectors": [
{
"type": "PseudoClassSelector",
"span": {
"start": 371,
"end": 377,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 372,
"end": 377,
"ctxt": 0
},
"value": "hover",
"raw": "hover"
},
"children": null
},
{
"type": "PseudoElementSelector",
"span": {
"start": 377,
"end": 385,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 379,
"end": 385,
"ctxt": 0
},
"value": "before",
"raw": "before"
},
"children": null
}
]
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 386,
"end": 388,
"ctxt": 0
},
"value": []
}
},
{
"type": "QualifiedRule",
"span": {
"start": 389,
"end": 417,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 389,
"end": 414,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 389,
"end": 414,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 389,
"end": 414,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TypeSelector",
"span": {
"start": 389,
"end": 390,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 389,
"end": 390,
"ctxt": 0
},
"value": "a",
"raw": "a"
}
},
"subclassSelectors": [
{
"type": "PseudoClassSelector",
"span": {
"start": 390,
"end": 396,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 391,
"end": 396,
"ctxt": 0
},
"value": "hover",
"raw": "hover"
},
"children": null
},
{
"type": "PseudoElementSelector",
"span": {
"start": 396,
"end": 414,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 398,
"end": 414,
"ctxt": 0
},
"value": "-moz-placeholder",
"raw": "-moz-placeholder"
},
"children": null
}
]
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 415,
"end": 417,
"ctxt": 0
},
"value": []
}
},
{
"type": "QualifiedRule",
"span": {
"start": 418,
"end": 440,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 418,
"end": 437,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 418,
"end": 419,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 418,
"end": 419,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TypeSelector",
"span": {
"start": 418,
"end": 419,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 418,
"end": 419,
"ctxt": 0
},
"value": "a",
"raw": "a"
}
},
"subclassSelectors": []
}
]
},
{
"type": "ComplexSelector",
"span": {
"start": 421,
"end": 437,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 421,
"end": 422,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TypeSelector",
"span": {
"start": 421,
"end": 422,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 421,
"end": 422,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
},
"subclassSelectors": []
},
{
"type": "Combinator",
"span": {
"start": 423,
"end": 424,
"ctxt": 0
},
"value": ">"
},
{
"type": "CompoundSelector",
"span": {
"start": 425,
"end": 437,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
"span": {
"start": 425,
"end": 429,
"ctxt": 0
},
"text": {
"type": "Identifier",
"span": {
"start": 426,
"end": 429,
"ctxt": 0
},
"value": "foo",
"raw": "foo"
}
},
{
"type": "PseudoElementSelector",
"span": {
"start": 429,
"end": 437,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 431,
"end": 437,
"ctxt": 0
},
"value": "before",
"raw": "before"
},
"children": null
}
]
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 438,
"end": 440,
"ctxt": 0
},
"value": []
}
},
{
"type": "QualifiedRule",
"span": {
"start": 441,
"end": 457,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 441,
"end": 454,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 441,
"end": 454,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 441,
"end": 454,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TypeSelector",
"span": {
"start": 441,
"end": 442,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 441,
"end": 442,
"ctxt": 0
},
"value": "*",
"raw": "*"
}
},
"subclassSelectors": [
{
"type": "PseudoClassSelector",
"span": {
"start": 442,
"end": 448,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 443,
"end": 448,
"ctxt": 0
},
"value": "hover",
"raw": "hover"
},
"children": null
},
{
"type": "ClassSelector",
"span": {
"start": 448,
"end": 454,
"ctxt": 0
},
"text": {
"type": "Identifier",
"span": {
"start": 449,
"end": 454,
"ctxt": 0
},
"value": "class",
"raw": "class"
}
}
]
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 455,
"end": 457,
"ctxt": 0
},
"value": []
}
}
]
}

View File

@ -6,9 +6,9 @@ error: Stylesheet
3 | | dialog::backdrop {}
4 | |
... |
29 | |
30 | | .form-range::-webkit-slider-thumb:active {}
| |____________________________________________^
36 | | a, b > .foo::before {}
37 | | *:hover.class {}
| |_________________^
error: Rule
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:1:1
@ -1120,3 +1120,441 @@ error: Block
30 | .form-range::-webkit-slider-thumb:active {}
| ^^
error: Rule
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:32:1
|
32 | a::bEfOrE {}
| ^^^^^^^^^^^^
error: QualifiedRule
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:32:1
|
32 | a::bEfOrE {}
| ^^^^^^^^^^^^
error: SelectorList
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:32:1
|
32 | a::bEfOrE {}
| ^^^^^^^^^
error: ComplexSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:32:1
|
32 | a::bEfOrE {}
| ^^^^^^^^^
error: CompoundSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:32:1
|
32 | a::bEfOrE {}
| ^^^^^^^^^
error: TypeSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:32:1
|
32 | a::bEfOrE {}
| ^
error: Ident
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:32:1
|
32 | a::bEfOrE {}
| ^
error: SubclassSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:32:2
|
32 | a::bEfOrE {}
| ^^^^^^^^
error: PseudoElementSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:32:2
|
32 | a::bEfOrE {}
| ^^^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:32:4
|
32 | a::bEfOrE {}
| ^^^^^^
error: Block
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:32:11
|
32 | a::bEfOrE {}
| ^^
error: Rule
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:34:1
|
34 | a:hover::before {}
| ^^^^^^^^^^^^^^^^^^
error: QualifiedRule
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:34:1
|
34 | a:hover::before {}
| ^^^^^^^^^^^^^^^^^^
error: SelectorList
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:34:1
|
34 | a:hover::before {}
| ^^^^^^^^^^^^^^^
error: ComplexSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:34:1
|
34 | a:hover::before {}
| ^^^^^^^^^^^^^^^
error: CompoundSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:34:1
|
34 | a:hover::before {}
| ^^^^^^^^^^^^^^^
error: TypeSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:34:1
|
34 | a:hover::before {}
| ^
error: Ident
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:34:1
|
34 | a:hover::before {}
| ^
error: SubclassSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:34:2
|
34 | a:hover::before {}
| ^^^^^^
error: PseudoClassSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:34:2
|
34 | a:hover::before {}
| ^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:34:3
|
34 | a:hover::before {}
| ^^^^^
error: SubclassSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:34:8
|
34 | a:hover::before {}
| ^^^^^^^^
error: PseudoElementSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:34:8
|
34 | a:hover::before {}
| ^^^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:34:10
|
34 | a:hover::before {}
| ^^^^^^
error: Block
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:34:17
|
34 | a:hover::before {}
| ^^
error: Rule
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:35:1
|
35 | a:hover::-moz-placeholder {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: QualifiedRule
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:35:1
|
35 | a:hover::-moz-placeholder {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: SelectorList
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:35:1
|
35 | a:hover::-moz-placeholder {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: ComplexSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:35:1
|
35 | a:hover::-moz-placeholder {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: CompoundSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:35:1
|
35 | a:hover::-moz-placeholder {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: TypeSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:35:1
|
35 | a:hover::-moz-placeholder {}
| ^
error: Ident
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:35:1
|
35 | a:hover::-moz-placeholder {}
| ^
error: SubclassSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:35:2
|
35 | a:hover::-moz-placeholder {}
| ^^^^^^
error: PseudoClassSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:35:2
|
35 | a:hover::-moz-placeholder {}
| ^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:35:3
|
35 | a:hover::-moz-placeholder {}
| ^^^^^
error: SubclassSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:35:8
|
35 | a:hover::-moz-placeholder {}
| ^^^^^^^^^^^^^^^^^^
error: PseudoElementSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:35:8
|
35 | a:hover::-moz-placeholder {}
| ^^^^^^^^^^^^^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:35:10
|
35 | a:hover::-moz-placeholder {}
| ^^^^^^^^^^^^^^^^
error: Block
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:35:27
|
35 | a:hover::-moz-placeholder {}
| ^^
error: Rule
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:36:1
|
36 | a, b > .foo::before {}
| ^^^^^^^^^^^^^^^^^^^^^^
error: QualifiedRule
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:36:1
|
36 | a, b > .foo::before {}
| ^^^^^^^^^^^^^^^^^^^^^^
error: SelectorList
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:36:1
|
36 | a, b > .foo::before {}
| ^^^^^^^^^^^^^^^^^^^
error: ComplexSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:36:1
|
36 | a, b > .foo::before {}
| ^
error: CompoundSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:36:1
|
36 | a, b > .foo::before {}
| ^
error: TypeSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:36:1
|
36 | a, b > .foo::before {}
| ^
error: Ident
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:36:1
|
36 | a, b > .foo::before {}
| ^
error: ComplexSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:36:4
|
36 | a, b > .foo::before {}
| ^^^^^^^^^^^^^^^^
error: CompoundSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:36:4
|
36 | a, b > .foo::before {}
| ^
error: TypeSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:36:4
|
36 | a, b > .foo::before {}
| ^
error: Ident
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:36:4
|
36 | a, b > .foo::before {}
| ^
error: Combinator
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:36:6
|
36 | a, b > .foo::before {}
| ^
error: CompoundSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:36:8
|
36 | a, b > .foo::before {}
| ^^^^^^^^^^^^
error: SubclassSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:36:8
|
36 | a, b > .foo::before {}
| ^^^^
error: ClassSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:36:8
|
36 | a, b > .foo::before {}
| ^^^^
error: Ident
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:36:9
|
36 | a, b > .foo::before {}
| ^^^
error: SubclassSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:36:12
|
36 | a, b > .foo::before {}
| ^^^^^^^^
error: PseudoElementSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:36:12
|
36 | a, b > .foo::before {}
| ^^^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:36:14
|
36 | a, b > .foo::before {}
| ^^^^^^
error: Block
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:36:21
|
36 | a, b > .foo::before {}
| ^^
error: Rule
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:37:1
|
37 | *:hover.class {}
| ^^^^^^^^^^^^^^^^
error: QualifiedRule
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:37:1
|
37 | *:hover.class {}
| ^^^^^^^^^^^^^^^^
error: SelectorList
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:37:1
|
37 | *:hover.class {}
| ^^^^^^^^^^^^^
error: ComplexSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:37:1
|
37 | *:hover.class {}
| ^^^^^^^^^^^^^
error: CompoundSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:37:1
|
37 | *:hover.class {}
| ^^^^^^^^^^^^^
error: TypeSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:37:1
|
37 | *:hover.class {}
| ^
error: Ident
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:37:1
|
37 | *:hover.class {}
| ^
error: SubclassSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:37:2
|
37 | *:hover.class {}
| ^^^^^^
error: PseudoClassSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:37:2
|
37 | *:hover.class {}
| ^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:37:3
|
37 | *:hover.class {}
| ^^^^^
error: SubclassSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:37:8
|
37 | *:hover.class {}
| ^^^^^^
error: ClassSelector
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:37:8
|
37 | *:hover.class {}
| ^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:37:9
|
37 | *:hover.class {}
| ^^^^^
error: Block
--> $DIR/tests/fixture/selector/pseudo-element/basic/input.css:37:15
|
37 | *:hover.class {}
| ^^

View File

@ -6,3 +6,18 @@ foo|* {}
h1 {}
\2d {}
\2d a {}
div\:before {}
d\iv {}
foreignObject {}
html textPath {}
div#thing {}
* {}
* #foo {}
*#foo {}
#foo * {}
.bar * {}
*.bar {}
*[lang^=en] {}
*:hover {}
*::before {}
* *:not(*) {}

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
* {
display: block;
}

View File

@ -1,108 +0,0 @@
{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 26,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 0,
"end": 25,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TypeSelector",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"value": "*",
"raw": "*"
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 2,
"end": 25,
"ctxt": 0
},
"value": [
{
"type": "Declaration",
"span": {
"start": 8,
"end": 22,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 8,
"end": 15,
"ctxt": 0
},
"value": "display",
"raw": "display"
},
"value": [
{
"type": "Identifier",
"span": {
"start": 17,
"end": 22,
"ctxt": 0
},
"value": "block",
"raw": "block"
}
],
"important": null
}
]
}
}
]
}

View File

@ -1,93 +0,0 @@
error: Stylesheet
--> $DIR/tests/fixture/selector/universal/input.css:1:1
|
1 | / * {
2 | | display: block;
3 | | }
| |__^
error: Rule
--> $DIR/tests/fixture/selector/universal/input.css:1:1
|
1 | / * {
2 | | display: block;
3 | | }
| |_^
error: QualifiedRule
--> $DIR/tests/fixture/selector/universal/input.css:1:1
|
1 | / * {
2 | | display: block;
3 | | }
| |_^
error: SelectorList
--> $DIR/tests/fixture/selector/universal/input.css:1:1
|
1 | * {
| ^
error: ComplexSelector
--> $DIR/tests/fixture/selector/universal/input.css:1:1
|
1 | * {
| ^
error: CompoundSelector
--> $DIR/tests/fixture/selector/universal/input.css:1:1
|
1 | * {
| ^
error: TypeSelector
--> $DIR/tests/fixture/selector/universal/input.css:1:1
|
1 | * {
| ^
error: Ident
--> $DIR/tests/fixture/selector/universal/input.css:1:1
|
1 | * {
| ^
error: Block
--> $DIR/tests/fixture/selector/universal/input.css:1:3
|
1 | * {
| ___^
2 | | display: block;
3 | | }
| |_^
error: Declaration
--> $DIR/tests/fixture/selector/universal/input.css:2:5
|
2 | display: block;
| ^^^^^^^^^^^^^^
error: DeclarationName
--> $DIR/tests/fixture/selector/universal/input.css:2:5
|
2 | display: block;
| ^^^^^^^
error: Ident
--> $DIR/tests/fixture/selector/universal/input.css:2:5
|
2 | display: block;
| ^^^^^^^
error: Value
--> $DIR/tests/fixture/selector/universal/input.css:2:14
|
2 | display: block;
| ^^^^^
error: Ident
--> $DIR/tests/fixture/selector/universal/input.css:2:14
|
2 | display: block;
| ^^^^^