swc/crates/swc_css_parser/tests/fixture/value/square-brackets/output.json

434 lines
11 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 207,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 0,
"end": 206,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TypeSelector",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"value": "div",
"raw": "div"
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 4,
"end": 206,
"ctxt": 0
},
"value": [
{
"type": "Declaration",
"span": {
"start": 10,
"end": 19,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 10,
"end": 14,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 17,
"end": 19,
"ctxt": 0
},
"name": "[",
"value": []
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 25,
"end": 35,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 25,
"end": 29,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 32,
"end": 35,
"ctxt": 0
},
"name": "[",
"value": []
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 41,
"end": 60,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 41,
"end": 45,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 48,
"end": 60,
"ctxt": 0
},
"name": "[",
"value": [
{
"type": "Identifier",
"span": {
"start": 49,
"end": 59,
"ctxt": 0
},
"value": "row1-start",
"raw": "row1-start"
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 66,
"end": 110,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 66,
"end": 70,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 73,
"end": 110,
"ctxt": 0
},
"name": "[",
"value": [
{
"type": "Identifier",
"span": {
"start": 77,
"end": 106,
"ctxt": 0
},
"value": "row1-start-with-spaces-around",
"raw": "row1-start-with-spaces-around"
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 116,
"end": 138,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 116,
"end": 120,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 123,
"end": 138,
"ctxt": 0
},
"name": "[",
"value": [
{
"type": "Identifier",
"span": {
"start": 124,
"end": 127,
"ctxt": 0
},
"value": "red",
"raw": "red"
},
{
"type": "HexColor",
"span": {
"start": 128,
"end": 132,
"ctxt": 0
},
"value": "fff",
"raw": "fff"
},
{
"type": "Dimension",
"span": {
"start": 133,
"end": 137,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 133,
"end": 135,
"ctxt": 0
},
"value": 12.0,
"raw": "12"
},
"unit": {
"type": "Identifier",
"span": {
"start": 135,
"end": 137,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 144,
"end": 203,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 144,
"end": 148,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 150,
"end": 162,
"ctxt": 0
},
"name": "[",
"value": [
{
"type": "Identifier",
"span": {
"start": 151,
"end": 161,
"ctxt": 0
},
"value": "row1-start",
"raw": "row1-start"
}
]
},
{
"type": "Percent",
"span": {
"start": 163,
"end": 166,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 163,
"end": 165,
"ctxt": 0
},
"value": 25.0,
"raw": "25"
}
},
{
"type": "SimpleBlock",
"span": {
"start": 167,
"end": 188,
"ctxt": 0
},
"name": "[",
"value": [
{
"type": "Identifier",
"span": {
"start": 168,
"end": 176,
"ctxt": 0
},
"value": "row1-end",
"raw": "row1-end"
},
{
"type": "Identifier",
"span": {
"start": 177,
"end": 187,
"ctxt": 0
},
"value": "row2-start",
"raw": "row2-start"
}
]
},
{
"type": "Percent",
"span": {
"start": 189,
"end": 192,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 189,
"end": 191,
"ctxt": 0
},
"value": 25.0,
"raw": "25"
}
},
{
"type": "SimpleBlock",
"span": {
"start": 193,
"end": 203,
"ctxt": 0
},
"name": "[",
"value": [
{
"type": "Identifier",
"span": {
"start": 194,
"end": 202,
"ctxt": 0
},
"value": "row2-end",
"raw": "row2-end"
}
]
}
],
"important": null
}
]
}
}
]
}