swc/crates/swc_css_parser/tests/fixture/value/square-brackets/output.json
2021-11-12 19:37:05 +09:00

384 lines
9.8 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 157,
"ctxt": 0
},
"rules": [
{
"type": "StyleRule",
"span": {
"start": 0,
"end": 156,
"ctxt": 0
},
"selectors": {
"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": 156,
"ctxt": 0
},
"items": [
{
"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": "SquareBracketBlock",
"span": {
"start": 17,
"end": 19,
"ctxt": 0
},
"children": []
}
],
"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": "SquareBracketBlock",
"span": {
"start": 32,
"end": 35,
"ctxt": 0
},
"children": []
}
],
"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": "SquareBracketBlock",
"span": {
"start": 48,
"end": 60,
"ctxt": 0
},
"children": [
{
"type": "Identifier",
"span": {
"start": 49,
"end": 59,
"ctxt": 0
},
"value": "row1-start",
"raw": "row1-start"
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 66,
"end": 88,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 66,
"end": 70,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "SquareBracketBlock",
"span": {
"start": 73,
"end": 88,
"ctxt": 0
},
"children": [
{
"type": "Identifier",
"span": {
"start": 74,
"end": 77,
"ctxt": 0
},
"value": "red",
"raw": "red"
},
{
"type": "HashValue",
"span": {
"start": 78,
"end": 82,
"ctxt": 0
},
"value": "fff",
"raw": "fff"
},
{
"type": "UnitValue",
"span": {
"start": 83,
"end": 87,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 83,
"end": 85,
"ctxt": 0
},
"value": 12.0,
"raw": "12"
},
"unit": {
"span": {
"start": 85,
"end": 87,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 94,
"end": 153,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 94,
"end": 98,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "SquareBracketBlock",
"span": {
"start": 100,
"end": 112,
"ctxt": 0
},
"children": [
{
"type": "Identifier",
"span": {
"start": 101,
"end": 111,
"ctxt": 0
},
"value": "row1-start",
"raw": "row1-start"
}
]
},
{
"type": "PercentValue",
"span": {
"start": 113,
"end": 116,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 113,
"end": 115,
"ctxt": 0
},
"value": 25.0,
"raw": "25"
}
},
{
"type": "SquareBracketBlock",
"span": {
"start": 117,
"end": 138,
"ctxt": 0
},
"children": [
{
"type": "Identifier",
"span": {
"start": 118,
"end": 126,
"ctxt": 0
},
"value": "row1-end",
"raw": "row1-end"
},
{
"type": "Identifier",
"span": {
"start": 127,
"end": 137,
"ctxt": 0
},
"value": "row2-start",
"raw": "row2-start"
}
]
},
{
"type": "PercentValue",
"span": {
"start": 139,
"end": 142,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 139,
"end": 141,
"ctxt": 0
},
"value": 25.0,
"raw": "25"
}
},
{
"type": "SquareBracketBlock",
"span": {
"start": 143,
"end": 153,
"ctxt": 0
},
"children": [
{
"type": "Identifier",
"span": {
"start": 144,
"end": 152,
"ctxt": 0
},
"value": "row2-end",
"raw": "row2-end"
}
]
}
],
"important": null
}
]
}
}
]
}