mirror of
https://github.com/swc-project/swc.git
synced 2024-12-19 11:42:13 +03:00
0b76d29ae4
swc_css_ast: - Add `SelectorLsit`. - Use `SelectorList` instead of `Vec<ComplexSelector>`.
110 lines
2.4 KiB
JSON
110 lines
2.4 KiB
JSON
{
|
|
"type": "Stylesheet",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 44,
|
|
"ctxt": 0
|
|
},
|
|
"rules": [
|
|
{
|
|
"type": "StyleRule",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 43,
|
|
"ctxt": 0
|
|
},
|
|
"selectors": {
|
|
"type": "SelectorList",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 3,
|
|
"ctxt": 0
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "ComplexSelector",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 3,
|
|
"ctxt": 0
|
|
},
|
|
"selectors": [
|
|
{
|
|
"type": "CompoundSelector",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 3,
|
|
"ctxt": 0
|
|
},
|
|
"hasNestPrefix": false,
|
|
"combinator": null,
|
|
"typeSelector": {
|
|
"type": "NamespacedName",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 3,
|
|
"ctxt": 0
|
|
},
|
|
"prefix": null,
|
|
"name": {
|
|
"type": "Text",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 3,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"raw": "foo"
|
|
}
|
|
},
|
|
"subclassSelectors": []
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"block": {
|
|
"type": "Block",
|
|
"span": {
|
|
"start": 4,
|
|
"end": 43,
|
|
"ctxt": 0
|
|
},
|
|
"items": [
|
|
{
|
|
"type": "Declaration",
|
|
"span": {
|
|
"start": 10,
|
|
"end": 20,
|
|
"ctxt": 0
|
|
},
|
|
"property": {
|
|
"type": "Text",
|
|
"span": {
|
|
"start": 10,
|
|
"end": 15,
|
|
"ctxt": 0
|
|
},
|
|
"value": "color",
|
|
"raw": "color"
|
|
},
|
|
"value": [
|
|
{
|
|
"type": "Text",
|
|
"span": {
|
|
"start": 17,
|
|
"end": 20,
|
|
"ctxt": 0
|
|
},
|
|
"value": "red",
|
|
"raw": "red"
|
|
}
|
|
],
|
|
"important": null
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|