swc/crates/swc_css_parser/tests/fixture/rome/functions/output.json

425 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": "QualifiedRule",
2021-08-19 08:16:32 +03:00
"span": {
"start": 0,
"end": 165,
2021-08-19 08:16:32 +03:00
"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",
2021-08-19 08:16:32 +03:00
"span": {
"start": 0,
2021-08-19 08:16:32 +03:00
"end": 6,
"ctxt": 0
},
"text": {
"type": "Ident",
"span": {
"start": 1,
"end": 6,
"ctxt": 0
},
"value": "style",
"raw": "style"
}
2021-08-19 08:16:32 +03:00
}
]
}
]
}
]
},
2021-08-19 08:16:32 +03:00
"block": {
"type": "SimpleBlock",
2021-08-19 08:16:32 +03:00
"span": {
"start": 7,
"end": 165,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": "{",
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 10,
"end": 22,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 10,
"end": 17,
"ctxt": 0
},
"value": "--fancy",
"raw": "--fancy"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 19,
"end": 22,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"token": {
"Dimension": {
"value": 2.0,
"raw_value": "2",
"unit": "px",
"raw_unit": "px",
"type": "integer"
}
}
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 25,
"end": 45,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Ident",
2021-08-19 08:16:32 +03:00
"span": {
"start": 25,
"end": 31,
"ctxt": 0
},
"value": "border",
"raw": "border"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "Function",
2021-08-19 08:16:32 +03:00
"span": {
"start": 33,
"end": 45,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Ident",
2021-08-19 08:16:32 +03:00
"span": {
"start": 33,
"end": 36,
"ctxt": 0
},
"value": "var",
"raw": "var"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 37,
"end": 44,
"ctxt": 0
},
"value": "--fancy",
"raw": "--fancy"
2021-08-19 08:16:32 +03:00
}
]
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 48,
"end": 76,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Ident",
2021-08-19 08:16:32 +03:00
"span": {
"start": 48,
"end": 57,
"ctxt": 0
},
"value": "font-size",
"raw": "font-size"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "Function",
2021-08-19 08:16:32 +03:00
"span": {
"start": 59,
"end": 76,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Ident",
2021-08-19 08:16:32 +03:00
"span": {
"start": 59,
"end": 63,
"ctxt": 0
},
"value": "calc",
"raw": "calc"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "BinValue",
"span": {
"start": 64,
"end": 75,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"op": "+",
"left": {
"type": "Length",
2021-08-19 08:16:32 +03:00
"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,
"raw": "10"
2021-08-19 08:16:32 +03:00
},
"unit": {
"type": "Ident",
2021-08-19 08:16:32 +03:00
"span": {
"start": 66,
"end": 68,
"ctxt": 0
},
"value": "px",
"raw": "px"
2021-08-19 08:16:32 +03:00
}
},
"right": {
"type": "Length",
2021-08-19 08:16:32 +03:00
"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,
"raw": "5"
2021-08-19 08:16:32 +03:00
},
"unit": {
"type": "Ident",
2021-08-19 08:16:32 +03:00
"span": {
"start": 72,
"end": 75,
"ctxt": 0
},
"value": "rem",
"raw": "rem"
2021-08-19 08:16:32 +03:00
}
}
}
]
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 79,
"end": 98,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Ident",
2021-08-19 08:16:32 +03:00
"span": {
"start": 79,
"end": 89,
"ctxt": 0
},
"value": "background",
"raw": "background"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "Url",
2021-08-19 08:16:32 +03:00
"span": {
"start": 91,
"end": 98,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Ident",
2021-08-19 08:16:32 +03:00
"span": {
"start": 91,
"end": 94,
"ctxt": 0
},
"value": "url",
"raw": "url"
2021-08-19 08:16:32 +03:00
},
"value": {
"type": "String",
"span": {
"start": 95,
"end": 97,
"ctxt": 0
},
"value": "",
"raw": "\"\""
},
"modifiers": []
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 101,
"end": 129,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Ident",
2021-08-19 08:16:32 +03:00
"span": {
"start": 101,
"end": 111,
"ctxt": 0
},
"value": "background",
"raw": "background"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "Url",
2021-08-19 08:16:32 +03:00
"span": {
"start": 113,
"end": 129,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Ident",
2021-08-19 08:16:32 +03:00
"span": {
"start": 113,
"end": 116,
"ctxt": 0
},
"value": "url",
"raw": "url"
2021-08-19 08:16:32 +03:00
},
"value": {
"type": "String",
"span": {
"start": 117,
"end": 128,
"ctxt": 0
},
"value": "something",
"raw": "\"something\""
},
"modifiers": []
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 132,
"end": 162,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Ident",
2021-08-19 08:16:32 +03:00
"span": {
"start": 132,
"end": 142,
"ctxt": 0
},
"value": "background",
"raw": "background"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "Url",
2021-08-19 08:16:32 +03:00
"span": {
"start": 144,
"end": 162,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Ident",
2021-08-19 08:16:32 +03:00
"span": {
"start": 144,
"end": 147,
"ctxt": 0
},
"value": "url",
"raw": "url"
2021-08-19 08:16:32 +03:00
},
"value": {
"type": "String",
"span": {
"start": 148,
"end": 161,
"ctxt": 0
},
"value": "./something",
"raw": "\"./something\""
},
"modifiers": []
2021-08-19 08:16:32 +03:00
}
],
"important": null
}
]
}
}
]
}