swc/crates/swc_css_parser/tests/fixture/at-rule/starting-style/output.json

354 lines
10 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 1,
"end": 148,
"ctxt": 0
},
"rules": [
{
"type": "AtRule",
"span": {
"start": 1,
"end": 148,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 2,
"end": 16,
"ctxt": 0
},
"value": "starting-style",
"raw": "starting-style"
},
"prelude": null,
"block": {
"type": "SimpleBlock",
"span": {
"start": 17,
"end": 148,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 17,
"end": 18,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "QualifiedRule",
"span": {
"start": 23,
"end": 72,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 23,
"end": 25,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 23,
"end": 25,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 23,
"end": 25,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TagNameSelector",
"span": {
"start": 23,
"end": 25,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 23,
"end": 25,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Ident",
"span": {
"start": 23,
"end": 25,
"ctxt": 0
},
"value": "h1",
"raw": "h1"
}
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 26,
"end": 72,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 26,
"end": 27,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 36,
"end": 65,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 36,
"end": 52,
"ctxt": 0
},
"value": "background-color",
"raw": "background-color"
},
"value": [
{
"type": "Ident",
"span": {
"start": 54,
"end": 65,
"ctxt": 0
},
"value": "transparent",
"raw": "transparent"
}
],
"important": null
}
]
}
},
{
"type": "AtRule",
"span": {
"start": 77,
"end": 146,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 78,
"end": 83,
"ctxt": 0
},
"value": "layer",
"raw": "layer"
},
"prelude": {
"type": "LayerName",
"span": {
"start": 84,
"end": 87,
"ctxt": 0
},
"name": [
{
"type": "Ident",
"span": {
"start": 84,
"end": 87,
"ctxt": 0
},
"value": "foo",
"raw": "foo"
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 88,
"end": 146,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 88,
"end": 89,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "QualifiedRule",
"span": {
"start": 98,
"end": 140,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 98,
"end": 101,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 98,
"end": 101,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 98,
"end": 101,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TagNameSelector",
"span": {
"start": 98,
"end": 101,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 98,
"end": 101,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Ident",
"span": {
"start": 98,
"end": 101,
"ctxt": 0
},
"value": "div",
"raw": "div"
}
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 102,
"end": 140,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 102,
"end": 103,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 116,
"end": 129,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 116,
"end": 122,
"ctxt": 0
},
"value": "height",
"raw": "height"
},
"value": [
{
"type": "Length",
"span": {
"start": 124,
"end": 129,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 124,
"end": 127,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
},
"unit": {
"type": "Ident",
"span": {
"start": 127,
"end": 129,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
],
"important": null
}
]
}
}
]
}
}
]
}
}
]
}