swc/css/parser/tests/fixture/rome/values/output.json
2021-10-10 10:43:11 +09:00

557 lines
13 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 183,
"ctxt": 0
},
"rules": [
{
"type": "StyleRule",
"span": {
"start": 0,
"end": 36,
"ctxt": 0
},
"selectors": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 9,
"ctxt": 0
},
"selectors": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 9,
"ctxt": 0
},
"hasNestPrefix": false,
"combinator": null,
"typeSelector": {
"type": "NamespacedName",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"value": "p",
"raw": "p"
}
},
"subclassSelectors": [
{
"type": "PseudoSelector",
"span": {
"start": 1,
"end": 9,
"ctxt": 0
},
"isElement": true,
"name": {
"type": "Text",
"span": {
"start": 3,
"end": 9,
"ctxt": 0
},
"value": "before",
"raw": "before"
},
"args": {
"type": "Tokens",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"tokens": []
}
}
]
}
]
}
],
"block": {
"type": "DeclBlock",
"span": {
"start": 10,
"end": 36,
"ctxt": 0
},
"items": [
{
"type": "Property",
"span": {
"start": 13,
"end": 33,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 13,
"end": 20,
"ctxt": 0
},
"value": "content",
"raw": "content"
},
"values": [
{
"type": "String",
"span": {
"start": 22,
"end": 33,
"ctxt": 0
},
"value": " content ",
"raw": "' content '"
}
],
"important": null
}
]
}
},
{
"type": "StyleRule",
"span": {
"start": 38,
"end": 115,
"ctxt": 0
},
"selectors": [
{
"type": "ComplexSelector",
"span": {
"start": 38,
"end": 45,
"ctxt": 0
},
"selectors": [
{
"type": "CompoundSelector",
"span": {
"start": 38,
"end": 45,
"ctxt": 0
},
"hasNestPrefix": false,
"combinator": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
"span": {
"start": 38,
"end": 45,
"ctxt": 0
},
"text": {
"type": "Text",
"span": {
"start": 39,
"end": 45,
"ctxt": 0
},
"value": "number",
"raw": "number"
}
}
]
}
]
}
],
"block": {
"type": "DeclBlock",
"span": {
"start": 46,
"end": 115,
"ctxt": 0
},
"items": [
{
"type": "Property",
"span": {
"start": 49,
"end": 62,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 49,
"end": 56,
"ctxt": 0
},
"value": "opacity",
"raw": "opacity"
},
"values": [
{
"type": "UnitValue",
"span": {
"start": 58,
"end": 62,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 58,
"end": 59,
"ctxt": 0
},
"value": 1.0
},
"unit": {
"span": {
"start": 59,
"end": 62,
"ctxt": 0
},
"kind": "e-3"
}
}
],
"important": null
},
{
"type": "Property",
"span": {
"start": 65,
"end": 81,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 65,
"end": 76,
"ctxt": 0
},
"value": "line-height",
"raw": "line-height"
},
"values": [
{
"type": "Number",
"span": {
"start": 78,
"end": 81,
"ctxt": 0
},
"value": 0.2
}
],
"important": null
},
{
"type": "Property",
"span": {
"start": 84,
"end": 94,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 84,
"end": 89,
"ctxt": 0
},
"value": "width",
"raw": "width"
},
"values": [
{
"type": "PercentValue",
"span": {
"start": 91,
"end": 94,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 91,
"end": 93,
"ctxt": 0
},
"value": 20.0
}
}
],
"important": null
},
{
"type": "Property",
"span": {
"start": 97,
"end": 112,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 97,
"end": 107,
"ctxt": 0
},
"value": "margin-top",
"raw": "margin-top"
},
"values": [
{
"type": "PercentValue",
"span": {
"start": 109,
"end": 112,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 109,
"end": 111,
"ctxt": 0
},
"value": -5.0
}
}
],
"important": null
}
]
}
},
{
"type": "StyleRule",
"span": {
"start": 117,
"end": 139,
"ctxt": 0
},
"selectors": [
{
"type": "ComplexSelector",
"span": {
"start": 117,
"end": 120,
"ctxt": 0
},
"selectors": [
{
"type": "CompoundSelector",
"span": {
"start": 117,
"end": 120,
"ctxt": 0
},
"hasNestPrefix": false,
"combinator": null,
"typeSelector": {
"type": "NamespacedName",
"span": {
"start": 117,
"end": 120,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 117,
"end": 120,
"ctxt": 0
},
"value": "foo",
"raw": "foo"
}
},
"subclassSelectors": []
}
]
}
],
"block": {
"type": "DeclBlock",
"span": {
"start": 121,
"end": 139,
"ctxt": 0
},
"items": [
{
"type": "Property",
"span": {
"start": 124,
"end": 137,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 124,
"end": 129,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"values": [
{
"type": "Text",
"span": {
"start": 131,
"end": 137,
"ctxt": 0
},
"value": "yellow",
"raw": "yellow"
}
],
"important": null
}
]
}
},
{
"type": "StyleRule",
"span": {
"start": 141,
"end": 182,
"ctxt": 0
},
"selectors": [
{
"type": "ComplexSelector",
"span": {
"start": 141,
"end": 144,
"ctxt": 0
},
"selectors": [
{
"type": "CompoundSelector",
"span": {
"start": 141,
"end": 144,
"ctxt": 0
},
"hasNestPrefix": false,
"combinator": null,
"typeSelector": {
"type": "NamespacedName",
"span": {
"start": 141,
"end": 144,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 141,
"end": 144,
"ctxt": 0
},
"value": "bar",
"raw": "bar"
}
},
"subclassSelectors": []
}
]
}
],
"block": {
"type": "DeclBlock",
"span": {
"start": 145,
"end": 182,
"ctxt": 0
},
"items": [
{
"type": "Property",
"span": {
"start": 148,
"end": 161,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 148,
"end": 153,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"values": [
{
"type": "Text",
"span": {
"start": 155,
"end": 161,
"ctxt": 0
},
"value": "yellow",
"raw": "yellow"
}
],
"important": null
},
{
"type": "Property",
"span": {
"start": 164,
"end": 180,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 164,
"end": 174,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"values": [
{
"type": "Text",
"span": {
"start": 176,
"end": 180,
"ctxt": 0
},
"value": "none",
"raw": "none"
}
],
"important": null
}
]
}
}
]
}