swc/css/parser/tests/fixture/rome/calc/output.json
2021-08-19 05:16:32 +00:00

1021 lines
31 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 239,
"ctxt": 0
},
"rules": [
{
"type": "StyleRule",
"span": {
"start": 0,
"end": 237,
"ctxt": 0
},
"selectors": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 7,
"ctxt": 0
},
"selectors": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"hasNestPrefix": false,
"combinator": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"text": {
"type": "Text",
"span": {
"start": 1,
"end": 6,
"ctxt": 0
},
"value": "style"
}
}
]
}
]
}
],
"block": {
"type": "DeclBlock",
"span": {
"start": 7,
"end": 237,
"ctxt": 0
},
"properties": [
{
"type": "Property",
"span": {
"start": 10,
"end": 17,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 10,
"end": 15,
"ctxt": 0
},
"value": "width"
},
"values": [
{
"type": "FnValue",
"span": {
"start": 17,
"end": 17,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 17,
"end": 21,
"ctxt": 0
},
"value": "calc"
},
"args": [
{
"type": "UnitValue",
"span": {
"start": 17,
"end": 22,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 22,
"end": 23,
"ctxt": 0
},
"value": 2.0
},
"unit": {
"span": {
"start": 23,
"end": 25,
"ctxt": 0
},
"kind": null
}
}
]
}
],
"important": null
},
{
"type": "Property",
"span": {
"start": 29,
"end": 47,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 29,
"end": 34,
"ctxt": 0
},
"value": "width"
},
"values": [
{
"type": "FnValue",
"span": {
"start": 36,
"end": 47,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 36,
"end": 40,
"ctxt": 0
},
"value": "calc"
},
"args": [
{
"type": "BinValue",
"span": {
"start": 41,
"end": 47,
"ctxt": 0
},
"op": "+",
"left": {
"type": "UnitValue",
"span": {
"start": 36,
"end": 41,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 41,
"end": 42,
"ctxt": 0
},
"value": 2.0
},
"unit": {
"span": {
"start": 42,
"end": 44,
"ctxt": 0
},
"kind": null
}
},
"right": {
"type": "UnitValue",
"span": {
"start": 47,
"end": 47,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 47,
"end": 48,
"ctxt": 0
},
"value": 1.0
},
"unit": {
"span": {
"start": 48,
"end": 50,
"ctxt": 0
},
"kind": null
}
}
}
]
}
],
"important": null
},
{
"type": "Property",
"span": {
"start": 54,
"end": 72,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 54,
"end": 59,
"ctxt": 0
},
"value": "width"
},
"values": [
{
"type": "FnValue",
"span": {
"start": 61,
"end": 72,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 61,
"end": 65,
"ctxt": 0
},
"value": "calc"
},
"args": [
{
"type": "BinValue",
"span": {
"start": 66,
"end": 72,
"ctxt": 0
},
"op": "+",
"left": {
"type": "UnitValue",
"span": {
"start": 61,
"end": 66,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 66,
"end": 67,
"ctxt": 0
},
"value": 2.0
},
"unit": {
"span": {
"start": 67,
"end": 69,
"ctxt": 0
},
"kind": "em"
}
},
"right": {
"type": "PercentValue",
"span": {
"start": 72,
"end": 72,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 72,
"end": 73,
"ctxt": 0
},
"value": 1.0
}
}
}
]
}
],
"important": null
},
{
"type": "Property",
"span": {
"start": 78,
"end": 101,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 78,
"end": 83,
"ctxt": 0
},
"value": "width"
},
"values": [
{
"type": "FnValue",
"span": {
"start": 85,
"end": 101,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 85,
"end": 89,
"ctxt": 0
},
"value": "calc"
},
"args": [
{
"type": "BinValue",
"span": {
"start": 90,
"end": 101,
"ctxt": 0
},
"op": "*",
"left": {
"type": "BinValue",
"span": {
"start": 90,
"end": 99,
"ctxt": 0
},
"op": "*",
"left": {
"type": "UnitValue",
"span": {
"start": 85,
"end": 90,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 90,
"end": 91,
"ctxt": 0
},
"value": 2.0
},
"unit": {
"span": {
"start": 91,
"end": 93,
"ctxt": 0
},
"kind": "em"
}
},
"right": {
"type": "Values",
"span": {
"start": 96,
"end": 99,
"ctxt": 0
},
"values": [
{
"type": "PercentValue",
"span": {
"start": 96,
"end": 96,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 96,
"end": 97,
"ctxt": 0
},
"value": 2.0
}
}
]
}
},
"right": {
"type": "UnitValue",
"span": {
"start": 101,
"end": 101,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 101,
"end": 102,
"ctxt": 0
},
"value": 3.0
},
"unit": {
"span": {
"start": 102,
"end": 104,
"ctxt": 0
},
"kind": null
}
}
}
]
}
],
"important": null
},
{
"type": "Property",
"span": {
"start": 108,
"end": 130,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 108,
"end": 113,
"ctxt": 0
},
"value": "width"
},
"values": [
{
"type": "FnValue",
"span": {
"start": 115,
"end": 130,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 115,
"end": 119,
"ctxt": 0
},
"value": "calc"
},
"args": [
{
"type": "BinValue",
"span": {
"start": 120,
"end": 130,
"ctxt": 0
},
"op": "/",
"left": {
"type": "BinValue",
"span": {
"start": 120,
"end": 128,
"ctxt": 0
},
"op": "/",
"left": {
"type": "UnitValue",
"span": {
"start": 115,
"end": 120,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 120,
"end": 121,
"ctxt": 0
},
"value": 2.0
},
"unit": {
"span": {
"start": 121,
"end": 123,
"ctxt": 0
},
"kind": "em"
}
},
"right": {
"type": "Values",
"span": {
"start": 126,
"end": 128,
"ctxt": 0
},
"values": [
{
"type": "Number",
"span": {
"start": 126,
"end": 127,
"ctxt": 0
},
"value": 2.0
}
]
}
},
"right": {
"type": "Number",
"span": {
"start": 130,
"end": 131,
"ctxt": 0
},
"value": 3.0
}
}
]
}
],
"important": null
},
{
"type": "Property",
"span": {
"start": 135,
"end": 168,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 135,
"end": 140,
"ctxt": 0
},
"value": "width"
},
"values": [
{
"type": "FnValue",
"span": {
"start": 142,
"end": 168,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 142,
"end": 146,
"ctxt": 0
},
"value": "calc"
},
"args": [
{
"type": "BinValue",
"span": {
"start": 147,
"end": 168,
"ctxt": 0
},
"op": "/",
"left": {
"type": "BinValue",
"span": {
"start": 147,
"end": 158,
"ctxt": 0
},
"op": "/",
"left": {
"type": "UnitValue",
"span": {
"start": 142,
"end": 147,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 147,
"end": 148,
"ctxt": 0
},
"value": 2.0
},
"unit": {
"span": {
"start": 148,
"end": 150,
"ctxt": 0
},
"kind": "em"
}
},
"right": {
"type": "Values",
"span": {
"start": 153,
"end": 158,
"ctxt": 0
},
"values": [
{
"type": "ParenValue",
"span": {
"start": 153,
"end": 158,
"ctxt": 0
},
"value": {
"type": "BinValue",
"span": {
"start": 154,
"end": 158,
"ctxt": 0
},
"op": "-",
"left": {
"type": "Number",
"span": {
"start": 154,
"end": 155,
"ctxt": 0
},
"value": 2.0
},
"right": {
"type": "Number",
"span": {
"start": 158,
"end": 159,
"ctxt": 0
},
"value": 3.0
}
}
}
]
}
},
"right": {
"type": "ParenValue",
"span": {
"start": 163,
"end": 168,
"ctxt": 0
},
"value": {
"type": "BinValue",
"span": {
"start": 164,
"end": 168,
"ctxt": 0
},
"op": "-",
"left": {
"type": "Number",
"span": {
"start": 164,
"end": 165,
"ctxt": 0
},
"value": 2.0
},
"right": {
"type": "Number",
"span": {
"start": 168,
"end": 169,
"ctxt": 0
},
"value": 6.0
}
}
}
}
]
}
],
"important": null
},
{
"type": "Property",
"span": {
"start": 174,
"end": 196,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 174,
"end": 179,
"ctxt": 0
},
"value": "width"
},
"values": [
{
"type": "FnValue",
"span": {
"start": 181,
"end": 196,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 181,
"end": 185,
"ctxt": 0
},
"value": "calc"
},
"args": [
{
"type": "BinValue",
"span": {
"start": 186,
"end": 196,
"ctxt": 0
},
"op": "+",
"left": {
"type": "BinValue",
"span": {
"start": 186,
"end": 194,
"ctxt": 0
},
"op": "*",
"left": {
"type": "UnitValue",
"span": {
"start": 181,
"end": 186,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 186,
"end": 187,
"ctxt": 0
},
"value": 2.0
},
"unit": {
"span": {
"start": 187,
"end": 189,
"ctxt": 0
},
"kind": "em"
}
},
"right": {
"type": "Values",
"span": {
"start": 192,
"end": 194,
"ctxt": 0
},
"values": [
{
"type": "Number",
"span": {
"start": 192,
"end": 193,
"ctxt": 0
},
"value": 2.0
}
]
}
},
"right": {
"type": "Number",
"span": {
"start": 196,
"end": 197,
"ctxt": 0
},
"value": 3.0
}
}
]
}
],
"important": null
},
{
"type": "Property",
"span": {
"start": 201,
"end": 233,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 201,
"end": 206,
"ctxt": 0
},
"value": "width"
},
"values": [
{
"type": "FnValue",
"span": {
"start": 208,
"end": 233,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 208,
"end": 212,
"ctxt": 0
},
"value": "calc"
},
"args": [
{
"type": "BinValue",
"span": {
"start": 213,
"end": 233,
"ctxt": 0
},
"op": "/",
"left": {
"type": "BinValue",
"span": {
"start": 213,
"end": 231,
"ctxt": 0
},
"op": "+",
"left": {
"type": "BinValue",
"span": {
"start": 213,
"end": 225,
"ctxt": 0
},
"op": "-",
"left": {
"type": "BinValue",
"span": {
"start": 213,
"end": 221,
"ctxt": 0
},
"op": "*",
"left": {
"type": "UnitValue",
"span": {
"start": 208,
"end": 213,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 213,
"end": 214,
"ctxt": 0
},
"value": 2.0
},
"unit": {
"span": {
"start": 214,
"end": 216,
"ctxt": 0
},
"kind": "em"
}
},
"right": {
"type": "Values",
"span": {
"start": 219,
"end": 221,
"ctxt": 0
},
"values": [
{
"type": "Number",
"span": {
"start": 219,
"end": 220,
"ctxt": 0
},
"value": 2.0
}
]
}
},
"right": {
"type": "Values",
"span": {
"start": 223,
"end": 225,
"ctxt": 0
},
"values": [
{
"type": "Number",
"span": {
"start": 223,
"end": 224,
"ctxt": 0
},
"value": 3.0
}
]
}
},
"right": {
"type": "Values",
"span": {
"start": 227,
"end": 231,
"ctxt": 0
},
"values": [
{
"type": "UnitValue",
"span": {
"start": 227,
"end": 227,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 227,
"end": 228,
"ctxt": 0
},
"value": 3.0
},
"unit": {
"span": {
"start": 228,
"end": 230,
"ctxt": 0
},
"kind": "em"
}
}
]
}
},
"right": {
"type": "Number",
"span": {
"start": 233,
"end": 234,
"ctxt": 0
},
"value": 5.0
}
}
]
}
],
"important": null
}
]
}
}
]
}