swc/crates/swc_css_parser/tests/fixture/value/length/output.json

332 lines
8.1 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 99,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 0,
"end": 98,
"ctxt": 0
},
"prelude": {
"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": "TagNameSelector",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Ident",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"value": "div",
"raw": "div"
}
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 4,
"end": 98,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 10,
"end": 23,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 10,
"end": 15,
"ctxt": 0
},
"value": "width",
"raw": "width"
},
"value": [
{
"type": "Length",
"span": {
"start": 17,
"end": 23,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 17,
"end": 20,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
},
"unit": {
"type": "Ident",
"span": {
"start": 20,
"end": 23,
"ctxt": 0
},
"value": "ex",
"raw": "e\\x"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 29,
"end": 41,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 29,
"end": 34,
"ctxt": 0
},
"value": "width",
"raw": "width"
},
"value": [
{
"type": "Length",
"span": {
"start": 36,
"end": 41,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 36,
"end": 39,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
},
"unit": {
"type": "Ident",
"span": {
"start": 39,
"end": 41,
"ctxt": 0
},
"value": "ex",
"raw": "ex"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 47,
"end": 59,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 47,
"end": 52,
"ctxt": 0
},
"value": "width",
"raw": "width"
},
"value": [
{
"type": "Length",
"span": {
"start": 54,
"end": 59,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 54,
"end": 57,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
},
"unit": {
"type": "Ident",
"span": {
"start": 57,
"end": 59,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 65,
"end": 77,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 65,
"end": 70,
"ctxt": 0
},
"value": "width",
"raw": "width"
},
"value": [
{
"type": "Length",
"span": {
"start": 72,
"end": 77,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 72,
"end": 75,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
},
"unit": {
"type": "Ident",
"span": {
"start": 75,
"end": 77,
"ctxt": 0
},
"value": "PX",
"raw": "PX"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 83,
"end": 95,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 83,
"end": 88,
"ctxt": 0
},
"value": "width",
"raw": "width"
},
"value": [
{
"type": "Length",
"span": {
"start": 90,
"end": 95,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 90,
"end": 93,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
},
"unit": {
"type": "Ident",
"span": {
"start": 93,
"end": 95,
"ctxt": 0
},
"value": "pX",
"raw": "pX"
}
}
],
"important": null
}
]
}
}
]
}