swc/css/parser/tests/fixture/esbuild/misc/12EwJCu6DsfOEJubQW9jLg/output.json
Alexander Akait 0b76d29ae4
feat(css/ast): Add SelectorList (#2639)
swc_css_ast:
 - Add `SelectorLsit`.
 - Use `SelectorList` instead of `Vec<ComplexSelector>`.
2021-11-04 09:54:55 +00:00

181 lines
4.2 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 59,
"ctxt": 0
},
"rules": [
{
"type": "StyleRule",
"span": {
"start": 0,
"end": 59,
"ctxt": 0
},
"selectors": {
"type": "SelectorList",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"selectors": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"hasNestPrefix": false,
"combinator": null,
"typeSelector": {
"type": "NamespacedName",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"value": "a",
"raw": "a"
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 2,
"end": 59,
"ctxt": 0
},
"items": [
{
"type": "Declaration",
"span": {
"start": 4,
"end": 26,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 4,
"end": 17,
"ctxt": 0
},
"value": "border-radius",
"raw": "border-radius"
},
"value": [
{
"type": "Number",
"span": {
"start": 19,
"end": 20,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
{
"type": "Number",
"span": {
"start": 21,
"end": 22,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
},
{
"type": "Number",
"span": {
"start": 23,
"end": 24,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
},
{
"type": "Number",
"span": {
"start": 25,
"end": 26,
"ctxt": 0
},
"value": 4.0,
"raw": "4"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 28,
"end": 56,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 28,
"end": 51,
"ctxt": 0
},
"value": "border-top-right-radius",
"raw": "border-top-right-radius"
},
"value": [
{
"type": "Number",
"span": {
"start": 53,
"end": 54,
"ctxt": 0
},
"value": 5.0,
"raw": "5"
},
{
"type": "Number",
"span": {
"start": 55,
"end": 56,
"ctxt": 0
},
"value": 6.0,
"raw": "6"
}
],
"important": null
}
]
}
}
]
}