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

515 lines
13 KiB
JSON
Raw Normal View History

{
"type": "Stylesheet",
"span": {
"start": 1,
"end": 208,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 1,
"end": 207,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TagNameSelector",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Ident",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"value": "div",
"raw": "div"
}
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 5,
"end": 207,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 5,
"end": 6,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 11,
"end": 20,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 11,
"end": 15,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 18,
"end": 20,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 18,
"end": 19,
"ctxt": 0
},
"token": "LBracket"
},
"value": []
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 26,
"end": 36,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 26,
"end": 30,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 33,
"end": 36,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 33,
"end": 34,
"ctxt": 0
},
"token": "LBracket"
},
"value": []
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 42,
"end": 61,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 42,
"end": 46,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 49,
"end": 61,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 49,
"end": 50,
"ctxt": 0
},
"token": "LBracket"
},
"value": [
{
"type": "Ident",
"span": {
"start": 50,
"end": 60,
"ctxt": 0
},
"value": "row1-start",
"raw": "row1-start"
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 67,
"end": 111,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 67,
"end": 71,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 74,
"end": 111,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 74,
"end": 75,
"ctxt": 0
},
"token": "LBracket"
},
"value": [
{
"type": "Ident",
"span": {
"start": 78,
"end": 107,
"ctxt": 0
},
"value": "row1-start-with-spaces-around",
"raw": "row1-start-with-spaces-around"
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 117,
"end": 139,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 117,
"end": 121,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 124,
"end": 139,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 124,
"end": 125,
"ctxt": 0
},
"token": "LBracket"
},
"value": [
{
"type": "Ident",
"span": {
"start": 125,
"end": 128,
"ctxt": 0
},
"value": "red",
"raw": "red"
},
{
"type": "HexColor",
"span": {
"start": 129,
"end": 133,
"ctxt": 0
},
"value": "fff",
"raw": "fff"
},
{
"type": "Length",
"span": {
"start": 134,
"end": 138,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 134,
"end": 136,
"ctxt": 0
},
"value": 12.0,
"raw": "12"
},
"unit": {
"type": "Ident",
"span": {
"start": 136,
"end": 138,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 145,
"end": 204,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 145,
"end": 149,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 151,
"end": 163,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 151,
"end": 152,
"ctxt": 0
},
"token": "LBracket"
},
"value": [
{
"type": "Ident",
"span": {
"start": 152,
"end": 162,
"ctxt": 0
},
"value": "row1-start",
"raw": "row1-start"
}
]
},
{
"type": "Percentage",
"span": {
"start": 164,
"end": 167,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 164,
"end": 166,
"ctxt": 0
},
"value": 25.0,
"raw": "25"
}
},
{
"type": "SimpleBlock",
"span": {
"start": 168,
"end": 189,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 168,
"end": 169,
"ctxt": 0
},
"token": "LBracket"
},
"value": [
{
"type": "Ident",
"span": {
"start": 169,
"end": 177,
"ctxt": 0
},
"value": "row1-end",
"raw": "row1-end"
},
{
"type": "Ident",
"span": {
"start": 178,
"end": 188,
"ctxt": 0
},
"value": "row2-start",
"raw": "row2-start"
}
]
},
{
"type": "Percentage",
"span": {
"start": 190,
"end": 193,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 190,
"end": 192,
"ctxt": 0
},
"value": 25.0,
"raw": "25"
}
},
{
"type": "SimpleBlock",
"span": {
"start": 194,
"end": 204,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 194,
"end": 195,
"ctxt": 0
},
"token": "LBracket"
},
"value": [
{
"type": "Ident",
"span": {
"start": 195,
"end": 203,
"ctxt": 0
},
"value": "row2-end",
"raw": "row2-end"
}
]
}
],
"important": null
}
]
}
}
]
}