swc/crates/swc_css_parser/tests/fixture/cdo-and-cdc/output.json
2022-10-29 08:28:39 +00:00

342 lines
7.8 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 1,
"end": 114,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 25,
"end": 44,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 25,
"end": 29,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 25,
"end": 29,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 25,
"end": 29,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
"span": {
"start": 25,
"end": 29,
"ctxt": 0
},
"text": {
"type": "Ident",
"span": {
"start": 26,
"end": 29,
"ctxt": 0
},
"value": "foo",
"raw": "foo"
}
}
]
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 30,
"end": 44,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 30,
"end": 31,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 32,
"end": 43,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 32,
"end": 37,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Ident",
"span": {
"start": 39,
"end": 42,
"ctxt": 0
},
"value": "red",
"raw": "red"
}
],
"important": null
}
]
}
},
{
"type": "QualifiedRule",
"span": {
"start": 51,
"end": 74,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 51,
"end": 54,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 51,
"end": 54,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 51,
"end": 54,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TagNameSelector",
"span": {
"start": 51,
"end": 54,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 51,
"end": 54,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Ident",
"span": {
"start": 51,
"end": 54,
"ctxt": 0
},
"value": "div",
"raw": "div"
}
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 55,
"end": 74,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 55,
"end": 56,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 61,
"end": 71,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 61,
"end": 66,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Ident",
"span": {
"start": 68,
"end": 71,
"ctxt": 0
},
"value": "red",
"raw": "red"
}
],
"important": null
}
]
}
},
{
"type": "QualifiedRule",
"span": {
"start": 82,
"end": 108,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 82,
"end": 88,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 82,
"end": 88,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 82,
"end": 88,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
"span": {
"start": 82,
"end": 88,
"ctxt": 0
},
"text": {
"type": "Ident",
"span": {
"start": 83,
"end": 88,
"ctxt": 0
},
"value": "class",
"raw": "class"
}
}
]
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 89,
"end": 108,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 89,
"end": 90,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 95,
"end": 105,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 95,
"end": 100,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Ident",
"span": {
"start": 102,
"end": 105,
"ctxt": 0
},
"value": "red",
"raw": "red"
}
],
"important": null
}
]
}
}
]
}