swc/css/parser/tests/fixture/dimension/basic/output.json

415 lines
10 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 132,
"ctxt": 0
},
"rules": [
{
"type": "StyleRule",
"span": {
"start": 0,
"end": 131,
"ctxt": 0
},
"selectors": {
"type": "SelectorList",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"selectors": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"hasNestPrefix": false,
"combinator": null,
"typeSelector": {
"type": "TypeSelector",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"value": "a",
"raw": "a"
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 2,
"end": 131,
"ctxt": 0
},
"items": [
{
"type": "Declaration",
"span": {
"start": 8,
"end": 18,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 8,
"end": 12,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "UnitValue",
"span": {
"start": 14,
"end": 18,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 14,
"end": 16,
"ctxt": 0
},
"value": 10.0,
"raw": "10"
},
"unit": {
"span": {
"start": 16,
"end": 18,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 24,
"end": 35,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 24,
"end": 28,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "UnitValue",
"span": {
"start": 30,
"end": 35,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 30,
"end": 33,
"ctxt": 0
},
"value": 0.1,
"raw": ".10"
},
"unit": {
"span": {
"start": 33,
"end": 35,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 41,
"end": 54,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 41,
"end": 45,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "UnitValue",
"span": {
"start": 47,
"end": 54,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 47,
"end": 52,
"ctxt": 0
},
"value": 12.34,
"raw": "12.34"
},
"unit": {
"span": {
"start": 52,
"end": 54,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 60,
"end": 76,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 60,
"end": 64,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "UnitValue",
"span": {
"start": 66,
"end": 76,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 66,
"end": 74,
"ctxt": 0
},
"value": 0.0,
"raw": "0000.000"
},
"unit": {
"span": {
"start": 74,
"end": 76,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 82,
"end": 94,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 82,
"end": 86,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "UnitValue",
"span": {
"start": 88,
"end": 94,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 88,
"end": 89,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"unit": {
"span": {
"start": 89,
"end": 94,
"ctxt": 0
},
"value": "px\\9",
"raw": "px\\\\9"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 100,
"end": 108,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 100,
"end": 104,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "UnitValue",
"span": {
"start": 106,
"end": 108,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 106,
"end": 107,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"unit": {
"span": {
"start": 107,
"end": 108,
"ctxt": 0
},
"value": "e",
"raw": "e"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 114,
"end": 128,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 114,
"end": 118,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "UnitValue",
"span": {
"start": 120,
"end": 128,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 120,
"end": 121,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"unit": {
"span": {
"start": 121,
"end": 128,
"ctxt": 0
},
"value": "unknown",
"raw": "unknown"
}
}
],
"important": null
}
]
}
}
]
}