mirror of
https://github.com/swc-project/swc.git
synced 2024-12-22 21:21:31 +03:00
0b76d29ae4
swc_css_ast: - Add `SelectorLsit`. - Use `SelectorList` instead of `Vec<ComplexSelector>`.
141 lines
3.4 KiB
JSON
141 lines
3.4 KiB
JSON
{
|
|
"type": "Stylesheet",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 51,
|
|
"ctxt": 0
|
|
},
|
|
"rules": [
|
|
{
|
|
"type": "DocumentRule",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 51,
|
|
"ctxt": 0
|
|
},
|
|
"selectors": [
|
|
{
|
|
"type": "FnValue",
|
|
"span": {
|
|
"start": 15,
|
|
"end": 27,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Text",
|
|
"span": {
|
|
"start": 15,
|
|
"end": 25,
|
|
"ctxt": 0
|
|
},
|
|
"value": "url-prefix",
|
|
"raw": "url-prefix"
|
|
},
|
|
"args": []
|
|
}
|
|
],
|
|
"block": [
|
|
{
|
|
"type": "StyleRule",
|
|
"span": {
|
|
"start": 30,
|
|
"end": 49,
|
|
"ctxt": 0
|
|
},
|
|
"selectors": {
|
|
"type": "SelectorList",
|
|
"span": {
|
|
"start": 30,
|
|
"end": 32,
|
|
"ctxt": 0
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "ComplexSelector",
|
|
"span": {
|
|
"start": 30,
|
|
"end": 32,
|
|
"ctxt": 0
|
|
},
|
|
"selectors": [
|
|
{
|
|
"type": "CompoundSelector",
|
|
"span": {
|
|
"start": 30,
|
|
"end": 32,
|
|
"ctxt": 0
|
|
},
|
|
"hasNestPrefix": false,
|
|
"combinator": null,
|
|
"typeSelector": {
|
|
"type": "NamespacedName",
|
|
"span": {
|
|
"start": 30,
|
|
"end": 32,
|
|
"ctxt": 0
|
|
},
|
|
"prefix": null,
|
|
"name": {
|
|
"type": "Text",
|
|
"span": {
|
|
"start": 30,
|
|
"end": 32,
|
|
"ctxt": 0
|
|
},
|
|
"value": "h1",
|
|
"raw": "h1"
|
|
}
|
|
},
|
|
"subclassSelectors": []
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"block": {
|
|
"type": "Block",
|
|
"span": {
|
|
"start": 33,
|
|
"end": 49,
|
|
"ctxt": 0
|
|
},
|
|
"items": [
|
|
{
|
|
"type": "Declaration",
|
|
"span": {
|
|
"start": 35,
|
|
"end": 47,
|
|
"ctxt": 0
|
|
},
|
|
"property": {
|
|
"type": "Text",
|
|
"span": {
|
|
"start": 35,
|
|
"end": 40,
|
|
"ctxt": 0
|
|
},
|
|
"value": "color",
|
|
"raw": "color"
|
|
},
|
|
"value": [
|
|
{
|
|
"type": "Text",
|
|
"span": {
|
|
"start": 42,
|
|
"end": 47,
|
|
"ctxt": 0
|
|
},
|
|
"value": "green",
|
|
"raw": "green"
|
|
}
|
|
],
|
|
"important": null
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|