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

340 lines
8.3 KiB
JSON
Raw Normal View History

{
"type": "Stylesheet",
"span": {
"start": 1,
"end": 100,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 1,
"end": 99,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TagNameSelector",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Ident",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"value": "div",
"raw": "div"
}
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 5,
"end": 99,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 5,
"end": 6,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 11,
"end": 24,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 11,
"end": 16,
"ctxt": 0
},
"value": "width",
"raw": "width"
},
"value": [
{
"type": "Length",
"span": {
"start": 18,
"end": 24,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 18,
"end": 21,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
},
"unit": {
"type": "Ident",
"span": {
"start": 21,
"end": 24,
"ctxt": 0
},
"value": "ex",
"raw": "e\\x"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 30,
"end": 42,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 30,
"end": 35,
"ctxt": 0
},
"value": "width",
"raw": "width"
},
"value": [
{
"type": "Length",
"span": {
"start": 37,
"end": 42,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 37,
"end": 40,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
},
"unit": {
"type": "Ident",
"span": {
"start": 40,
"end": 42,
"ctxt": 0
},
"value": "ex",
"raw": "ex"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 48,
"end": 60,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 48,
"end": 53,
"ctxt": 0
},
"value": "width",
"raw": "width"
},
"value": [
{
"type": "Length",
"span": {
"start": 55,
"end": 60,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 55,
"end": 58,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
},
"unit": {
"type": "Ident",
"span": {
"start": 58,
"end": 60,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 66,
"end": 78,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 66,
"end": 71,
"ctxt": 0
},
"value": "width",
"raw": "width"
},
"value": [
{
"type": "Length",
"span": {
"start": 73,
"end": 78,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 73,
"end": 76,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
},
"unit": {
"type": "Ident",
"span": {
"start": 76,
"end": 78,
"ctxt": 0
},
"value": "PX",
"raw": "PX"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 84,
"end": 96,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 84,
"end": 89,
"ctxt": 0
},
"value": "width",
"raw": "width"
},
"value": [
{
"type": "Length",
"span": {
"start": 91,
"end": 96,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 91,
"end": 94,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
},
"unit": {
"type": "Ident",
"span": {
"start": 94,
"end": 96,
"ctxt": 0
},
"value": "pX",
"raw": "pX"
}
}
],
"important": null
}
]
}
}
]
}