swc/css/parser/tests/fixture/rome/values/output.json
2021-10-27 03:38:05 +09:00

545 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": "Block",
"span": {
"start": 10,
"end": 36,
"ctxt": 0
},
"items": [
{
"type": "Declaration",
"span": {
"start": 13,
"end": 33,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 13,
"end": 20,
"ctxt": 0
},
"value": "content",
"raw": "content"
},
"value": [
{
"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": "Block",
"span": {
"start": 46,
"end": 115,
"ctxt": 0
},
"items": [
{
"type": "Declaration",
"span": {
"start": 49,
"end": 62,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 49,
"end": 56,
"ctxt": 0
},
"value": "opacity",
"raw": "opacity"
},
"value": [
{
"type": "Number",
"span": {
"start": 58,
"end": 62,
"ctxt": 0
},
"value": 0.001,
"raw": "1e-3"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 65,
"end": 81,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 65,
"end": 76,
"ctxt": 0
},
"value": "line-height",
"raw": "line-height"
},
"value": [
{
"type": "Number",
"span": {
"start": 78,
"end": 81,
"ctxt": 0
},
"value": 0.2,
"raw": "0.2"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 84,
"end": 94,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 84,
"end": 89,
"ctxt": 0
},
"value": "width",
"raw": "width"
},
"value": [
{
"type": "PercentValue",
"span": {
"start": 91,
"end": 94,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 91,
"end": 93,
"ctxt": 0
},
"value": 20.0,
"raw": "20"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 97,
"end": 112,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 97,
"end": 107,
"ctxt": 0
},
"value": "margin-top",
"raw": "margin-top"
},
"value": [
{
"type": "PercentValue",
"span": {
"start": 109,
"end": 112,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 109,
"end": 111,
"ctxt": 0
},
"value": -5.0,
"raw": "-5"
}
}
],
"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": "Block",
"span": {
"start": 121,
"end": 139,
"ctxt": 0
},
"items": [
{
"type": "Declaration",
"span": {
"start": 124,
"end": 137,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 124,
"end": 129,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"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": "Block",
"span": {
"start": 145,
"end": 182,
"ctxt": 0
},
"items": [
{
"type": "Declaration",
"span": {
"start": 148,
"end": 161,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 148,
"end": 153,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Text",
"span": {
"start": 155,
"end": 161,
"ctxt": 0
},
"value": "yellow",
"raw": "yellow"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 164,
"end": 180,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 164,
"end": 174,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Text",
"span": {
"start": 176,
"end": 180,
"ctxt": 0
},
"value": "none",
"raw": "none"
}
],
"important": null
}
]
}
}
]
}