swc/crates/swc_css_parser/tests/recovery/function/var/output.json

356 lines
10 KiB
JSON
Raw Normal View History

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 85,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 0,
"end": 84,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 0,
"end": 6,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 6,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 6,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
"span": {
"start": 0,
"end": 6,
"ctxt": 0
},
"text": {
"type": "Ident",
"span": {
"start": 1,
"end": 6,
"ctxt": 0
},
"value": "style",
"raw": "style"
}
}
]
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 7,
"end": 84,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 10,
"end": 27,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 10,
"end": 16,
"ctxt": 0
},
"value": "border",
"raw": "border"
},
"value": [
{
"type": "Function",
"span": {
"start": 18,
"end": 27,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 18,
"end": 21,
"ctxt": 0
},
"value": "var",
"raw": "var"
},
"value": [
{
"type": "HexColor",
"span": {
"start": 22,
"end": 26,
"ctxt": 0
},
"value": "fff",
"raw": "fff"
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 30,
"end": 60,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 30,
"end": 36,
"ctxt": 0
},
"value": "border",
"raw": "border"
},
"value": [
{
"type": "Function",
"span": {
"start": 38,
"end": 60,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 38,
"end": 41,
"ctxt": 0
},
"value": "var",
"raw": "var"
},
"value": [
{
"type": "Function",
"span": {
"start": 42,
"end": 59,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 42,
"end": 46,
"ctxt": 0
},
"value": "calc",
"raw": "calc"
},
"value": [
{
"type": "CalcSum",
"span": {
"start": 47,
"end": 58,
"ctxt": 0
},
"expressions": [
{
"type": "CalcProduct",
"span": {
"start": 47,
"end": 51,
"ctxt": 0
},
"expressions": [
{
"type": "Length",
"span": {
"start": 47,
"end": 51,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 47,
"end": 49,
"ctxt": 0
},
"value": 10.0,
"raw": "10"
},
"unit": {
"type": "Ident",
"span": {
"start": 49,
"end": 51,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
]
},
{
"type": "CalcOperator",
"span": {
"start": 52,
"end": 53,
"ctxt": 0
},
"value": "+"
},
{
"type": "CalcProduct",
"span": {
"start": 54,
"end": 58,
"ctxt": 0
},
"expressions": [
{
"type": "Length",
"span": {
"start": 54,
"end": 58,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 54,
"end": 56,
"ctxt": 0
},
"value": 10.0,
"raw": "10"
},
"unit": {
"type": "Ident",
"span": {
"start": 56,
"end": 58,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
]
}
]
}
]
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 63,
"end": 81,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 63,
"end": 69,
"ctxt": 0
},
"value": "border",
"raw": "border"
},
"value": [
{
"type": "Function",
"span": {
"start": 71,
"end": 81,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 71,
"end": 74,
"ctxt": 0
},
"value": "var",
"raw": "var"
},
"value": [
{
"type": "Length",
"span": {
"start": 75,
"end": 80,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 75,
"end": 77,
"ctxt": 0
},
"value": 90.0,
"raw": "90"
},
"unit": {
"type": "Ident",
"span": {
"start": 77,
"end": 80,
"ctxt": 0
},
"value": "rem",
"raw": "rem"
}
}
]
}
],
"important": null
}
]
}
}
]
}