swc/css/parser/tests/fixture/esbuild/misc/S2Mhk5rU2YxQPgm9rtF9WA/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

152 lines
3.6 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 65,
"ctxt": 0
},
"rules": [
{
"type": "DocumentRule",
"span": {
"start": 0,
"end": 65,
"ctxt": 0
},
"selectors": [
{
"type": "FnValue",
"span": {
"start": 10,
"end": 41,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 10,
"end": 13,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"args": [
{
"type": "String",
"span": {
"start": 14,
"end": 40,
"ctxt": 0
},
"value": "https://www.example.com/",
"raw": "\"https://www.example.com/\""
}
]
}
],
"block": [
{
"type": "StyleRule",
"span": {
"start": 44,
"end": 63,
"ctxt": 0
},
"selectors": {
"type": "SelectorList",
"span": {
"start": 44,
"end": 46,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 44,
"end": 46,
"ctxt": 0
},
"selectors": [
{
"type": "CompoundSelector",
"span": {
"start": 44,
"end": 46,
"ctxt": 0
},
"hasNestPrefix": false,
"combinator": null,
"typeSelector": {
"type": "NamespacedName",
"span": {
"start": 44,
"end": 46,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 44,
"end": 46,
"ctxt": 0
},
"value": "h1",
"raw": "h1"
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 47,
"end": 63,
"ctxt": 0
},
"items": [
{
"type": "Declaration",
"span": {
"start": 49,
"end": 61,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 49,
"end": 54,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Text",
"span": {
"start": 56,
"end": 61,
"ctxt": 0
},
"value": "green",
"raw": "green"
}
],
"important": null
}
]
}
}
]
}
]
}