mirror of
https://github.com/swc-project/swc.git
synced 2024-12-22 13:11:31 +03:00
0b76d29ae4
swc_css_ast: - Add `SelectorLsit`. - Use `SelectorList` instead of `Vec<ComplexSelector>`.
187 lines
5.0 KiB
JSON
187 lines
5.0 KiB
JSON
{
|
|
"type": "Stylesheet",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 55,
|
|
"ctxt": 0
|
|
},
|
|
"rules": [
|
|
{
|
|
"type": "StyleRule",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 54,
|
|
"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": 54,
|
|
"ctxt": 0
|
|
},
|
|
"items": [
|
|
{
|
|
"type": "Declaration",
|
|
"span": {
|
|
"start": 8,
|
|
"end": 51,
|
|
"ctxt": 0
|
|
},
|
|
"property": {
|
|
"type": "Text",
|
|
"span": {
|
|
"start": 8,
|
|
"end": 14,
|
|
"ctxt": 0
|
|
},
|
|
"value": "cursor",
|
|
"raw": "cursor"
|
|
},
|
|
"value": [
|
|
{
|
|
"type": "CommaValues",
|
|
"span": {
|
|
"start": 15,
|
|
"end": 51,
|
|
"ctxt": 0
|
|
},
|
|
"values": [
|
|
{
|
|
"type": "FnValue",
|
|
"span": {
|
|
"start": 16,
|
|
"end": 42,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Text",
|
|
"span": {
|
|
"start": 16,
|
|
"end": 25,
|
|
"ctxt": 0
|
|
},
|
|
"value": "image-set",
|
|
"raw": "image-set"
|
|
},
|
|
"args": [
|
|
{
|
|
"type": "SpaceValues",
|
|
"span": {
|
|
"start": 26,
|
|
"end": 41,
|
|
"ctxt": 0
|
|
},
|
|
"values": [
|
|
{
|
|
"type": "UrlValue",
|
|
"span": {
|
|
"start": 26,
|
|
"end": 38,
|
|
"ctxt": 0
|
|
},
|
|
"url": "foo.jpg",
|
|
"raw": "foo.jpg"
|
|
},
|
|
{
|
|
"type": "UnitValue",
|
|
"span": {
|
|
"start": 39,
|
|
"end": 41,
|
|
"ctxt": 0
|
|
},
|
|
"value": {
|
|
"type": "Number",
|
|
"span": {
|
|
"start": 39,
|
|
"end": 40,
|
|
"ctxt": 0
|
|
},
|
|
"value": 2.0,
|
|
"raw": "2"
|
|
},
|
|
"unit": {
|
|
"span": {
|
|
"start": 40,
|
|
"end": 41,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"raw": "x"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "Text",
|
|
"span": {
|
|
"start": 44,
|
|
"end": 51,
|
|
"ctxt": 0
|
|
},
|
|
"value": "pointer",
|
|
"raw": "pointer"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"important": null
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|