swc/css/parser/tests/line-comment/css-in-js/2/output.json
Alexander Akait 75e6e08e14
refactor(css/ast): Refactor complex selector to represent all css (#2660)
swc_css_ast:
 - Add a type to represent a child of `ComplexSelector`.
2021-11-08 00:29:25 +09:00

109 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
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TypeSelector",
"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": 30,
"end": 40,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 30,
"end": 35,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Text",
"span": {
"start": 37,
"end": 40,
"ctxt": 0
},
"value": "red",
"raw": "red"
}
],
"important": null
}
]
}
}
]
}