swc/crates/swc_css_parser/tests/fixture/cdo-and-cdc/output.json

318 lines
7.3 KiB
JSON
Raw Normal View History

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 113,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 24,
"end": 43,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 24,
"end": 28,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 24,
"end": 28,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 24,
"end": 28,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
"span": {
"start": 24,
"end": 28,
"ctxt": 0
},
"text": {
"type": "Ident",
"span": {
"start": 25,
"end": 28,
"ctxt": 0
},
"value": "foo",
"raw": "foo"
}
}
]
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 29,
"end": 43,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 31,
"end": 41,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 31,
"end": 36,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Ident",
"span": {
"start": 38,
"end": 41,
"ctxt": 0
},
"value": "red",
"raw": "red"
}
],
"important": null
}
]
}
},
{
"type": "QualifiedRule",
"span": {
"start": 50,
"end": 73,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 50,
"end": 53,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 50,
"end": 53,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 50,
"end": 53,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TagNameSelector",
"span": {
"start": 50,
"end": 53,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 50,
"end": 53,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Ident",
"span": {
"start": 50,
"end": 53,
"ctxt": 0
},
"value": "div",
"raw": "div"
}
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 54,
"end": 73,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 60,
"end": 70,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 60,
"end": 65,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Ident",
"span": {
"start": 67,
"end": 70,
"ctxt": 0
},
"value": "red",
"raw": "red"
}
],
"important": null
}
]
}
},
{
"type": "QualifiedRule",
"span": {
"start": 81,
"end": 107,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 81,
"end": 87,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 81,
"end": 87,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 81,
"end": 87,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
"span": {
"start": 81,
"end": 87,
"ctxt": 0
},
"text": {
"type": "Ident",
"span": {
"start": 82,
"end": 87,
"ctxt": 0
},
"value": "class",
"raw": "class"
}
}
]
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 88,
"end": 107,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 94,
"end": 104,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 94,
"end": 99,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Ident",
"span": {
"start": 101,
"end": 104,
"ctxt": 0
},
"value": "red",
"raw": "red"
}
],
"important": null
}
]
}
}
]
}