swc/css/parser/tests/fixture/rome/functions/output.json
2021-10-19 17:32:59 +09:00

428 lines
11 KiB
JSON

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