swc/css/parser/tests/fixture/rome/functions/output.json

419 lines
11 KiB
JSON
Raw Normal View History

2021-08-19 08:16:32 +03:00
{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 166,
"ctxt": 0
},
"rules": [
{
"type": "StyleRule",
"span": {
"start": 0,
"end": 165,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"selectors": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 6,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"selectors": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 6,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"hasNestPrefix": false,
"combinator": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
"span": {
"start": 0,
"end": 6,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"text": {
"type": "Text",
"span": {
"start": 1,
"end": 6,
"ctxt": 0
},
"value": "style",
"raw": "style"
2021-08-19 08:16:32 +03:00
}
}
]
}
]
}
],
"block": {
"type": "DeclBlock",
"span": {
"start": 7,
"end": 165,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"items": [
2021-08-19 08:16:32 +03:00
{
"type": "Property",
"span": {
"start": 10,
"end": 22,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 10,
"end": 17,
"ctxt": 0
},
"value": "--fancy",
"raw": "--fancy"
2021-08-19 08:16:32 +03:00
},
"values": [
{
"type": "UnitValue",
"span": {
"start": 19,
"end": 22,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 19,
"end": 20,
"ctxt": 0
},
"value": 2.0
},
"unit": {
"span": {
"start": 20,
"end": 22,
"ctxt": 0
},
"kind": null
}
}
],
"important": null
},
{
"type": "Property",
"span": {
"start": 25,
"end": 45,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 25,
"end": 31,
"ctxt": 0
},
"value": "border",
"raw": "border"
2021-08-19 08:16:32 +03:00
},
"values": [
{
"type": "FnValue",
"span": {
"start": 33,
"end": 45,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 33,
"end": 36,
"ctxt": 0
},
"value": "var",
"raw": "var"
2021-08-19 08:16:32 +03:00
},
"args": [
{
"type": "Text",
"span": {
"start": 37,
"end": 44,
"ctxt": 0
},
"value": "--fancy",
"raw": "--fancy"
2021-08-19 08:16:32 +03:00
}
]
}
],
"important": null
},
{
"type": "Property",
"span": {
"start": 48,
"end": 76,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 48,
"end": 57,
"ctxt": 0
},
"value": "font-size",
"raw": "font-size"
2021-08-19 08:16:32 +03:00
},
"values": [
{
"type": "FnValue",
"span": {
"start": 59,
"end": 76,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 59,
"end": 63,
"ctxt": 0
},
"value": "calc",
"raw": "calc"
2021-08-19 08:16:32 +03:00
},
"args": [
{
"type": "BinValue",
"span": {
"start": 64,
"end": 75,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"op": "+",
"left": {
"type": "UnitValue",
"span": {
"start": 64,
"end": 68,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 64,
"end": 66,
"ctxt": 0
},
"value": 10.0
},
"unit": {
"span": {
"start": 66,
"end": 68,
"ctxt": 0
},
"kind": null
}
},
"right": {
"type": "UnitValue",
"span": {
"start": 71,
"end": 75,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 71,
"end": 72,
"ctxt": 0
},
"value": 5.0
},
"unit": {
"span": {
"start": 72,
"end": 75,
"ctxt": 0
},
"kind": "rem"
}
}
}
]
}
],
"important": null
},
{
"type": "Property",
"span": {
"start": 79,
"end": 98,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 79,
"end": 89,
"ctxt": 0
},
"value": "background",
"raw": "background"
2021-08-19 08:16:32 +03:00
},
"values": [
{
"type": "FnValue",
"span": {
"start": 91,
"end": 98,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 91,
"end": 94,
"ctxt": 0
},
"value": "url",
"raw": "url"
2021-08-19 08:16:32 +03:00
},
"args": [
{
"type": "String",
"span": {
"start": 95,
"end": 97,
"ctxt": 0
},
"value": ""
}
]
}
],
"important": null
},
{
"type": "Property",
"span": {
"start": 101,
"end": 129,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 101,
"end": 111,
"ctxt": 0
},
"value": "background",
"raw": "background"
2021-08-19 08:16:32 +03:00
},
"values": [
{
"type": "FnValue",
"span": {
"start": 113,
"end": 129,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 113,
"end": 116,
"ctxt": 0
},
"value": "url",
"raw": "url"
2021-08-19 08:16:32 +03:00
},
"args": [
{
"type": "String",
"span": {
"start": 117,
"end": 128,
"ctxt": 0
},
"value": "something"
}
]
}
],
"important": null
},
{
"type": "Property",
"span": {
"start": 132,
"end": 162,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 132,
"end": 142,
"ctxt": 0
},
"value": "background",
"raw": "background"
2021-08-19 08:16:32 +03:00
},
"values": [
{
"type": "FnValue",
"span": {
"start": 144,
"end": 162,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 144,
"end": 147,
"ctxt": 0
},
"value": "url",
"raw": "url"
2021-08-19 08:16:32 +03:00
},
"args": [
{
"type": "String",
"span": {
"start": 148,
"end": 161,
"ctxt": 0
},
"value": "./something"
}
]
}
],
"important": null
}
]
}
}
]
}