swc/crates/swc_css_parser/tests/fixture/rome/values/output.json

573 lines
14 KiB
JSON
Raw Normal View History

2021-08-19 08:16:32 +03:00
{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 183,
"ctxt": 0
},
"rules": [
{
"type": "StyleRule",
"span": {
"start": 0,
"end": 36,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"selectors": {
"type": "SelectorList",
"span": {
"start": 0,
"end": 9,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 9,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
2021-08-19 08:16:32 +03:00
"span": {
"start": 0,
"end": 9,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TypeSelector",
2021-08-19 08:16:32 +03:00
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"prefix": null,
2021-08-19 08:16:32 +03:00
"name": {
"type": "Identifier",
2021-08-19 08:16:32 +03:00
"span": {
"start": 0,
"end": 1,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"value": "p",
"raw": "p"
}
},
"subclassSelectors": [
{
"type": "PseudoSelector",
2021-08-19 08:16:32 +03:00
"span": {
"start": 1,
"end": 9,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"isElement": true,
"name": {
"type": "Identifier",
"span": {
"start": 3,
"end": 9,
"ctxt": 0
},
"value": "before",
"raw": "before"
},
"args": {
"type": "Tokens",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"tokens": []
}
2021-08-19 08:16:32 +03:00
}
]
}
]
}
]
},
2021-08-19 08:16:32 +03:00
"block": {
"type": "Block",
2021-08-19 08:16:32 +03:00
"span": {
"start": 10,
"end": 36,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"items": [
2021-08-19 08:16:32 +03:00
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 13,
"end": 33,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"property": {
"type": "Identifier",
2021-08-19 08:16:32 +03:00
"span": {
"start": 13,
"end": 20,
"ctxt": 0
},
"value": "content",
"raw": "content"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "String",
"span": {
"start": 22,
"end": 33,
"ctxt": 0
},
"value": " content ",
"raw": "' content '"
2021-08-19 08:16:32 +03:00
}
],
"important": null
}
]
}
},
{
"type": "StyleRule",
"span": {
"start": 38,
"end": 115,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"selectors": {
"type": "SelectorList",
"span": {
"start": 38,
"end": 45,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 38,
"end": 45,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 38,
"end": 45,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
2021-08-19 08:16:32 +03:00
"span": {
"start": 38,
2021-08-19 08:16:32 +03:00
"end": 45,
"ctxt": 0
},
"text": {
"type": "Identifier",
"span": {
"start": 39,
"end": 45,
"ctxt": 0
},
"value": "number",
"raw": "number"
}
2021-08-19 08:16:32 +03:00
}
]
}
]
}
]
},
2021-08-19 08:16:32 +03:00
"block": {
"type": "Block",
2021-08-19 08:16:32 +03:00
"span": {
"start": 46,
"end": 115,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"items": [
2021-08-19 08:16:32 +03:00
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 49,
"end": 62,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"property": {
"type": "Identifier",
2021-08-19 08:16:32 +03:00
"span": {
"start": 49,
"end": 56,
"ctxt": 0
},
"value": "opacity",
"raw": "opacity"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "Number",
2021-08-19 08:16:32 +03:00
"span": {
"start": 58,
"end": 62,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"value": 0.001,
"raw": "1e-3"
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 65,
"end": 81,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"property": {
"type": "Identifier",
2021-08-19 08:16:32 +03:00
"span": {
"start": 65,
"end": 76,
"ctxt": 0
},
"value": "line-height",
"raw": "line-height"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "Number",
"span": {
"start": 78,
"end": 81,
"ctxt": 0
},
"value": 0.2,
"raw": "0.2"
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 84,
"end": 94,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"property": {
"type": "Identifier",
2021-08-19 08:16:32 +03:00
"span": {
"start": 84,
"end": 89,
"ctxt": 0
},
"value": "width",
"raw": "width"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PercentValue",
"span": {
"start": 91,
"end": 94,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 91,
"end": 93,
"ctxt": 0
},
"value": 20.0,
"raw": "20"
2021-08-19 08:16:32 +03:00
}
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 97,
"end": 112,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"property": {
"type": "Identifier",
2021-08-19 08:16:32 +03:00
"span": {
"start": 97,
"end": 107,
"ctxt": 0
},
"value": "margin-top",
"raw": "margin-top"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PercentValue",
"span": {
"start": 109,
"end": 112,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 109,
"end": 111,
"ctxt": 0
},
"value": -5.0,
"raw": "-5"
2021-08-19 08:16:32 +03:00
}
}
],
"important": null
}
]
}
},
{
"type": "StyleRule",
"span": {
"start": 117,
"end": 139,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"selectors": {
"type": "SelectorList",
"span": {
"start": 117,
"end": 120,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 117,
"end": 120,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
2021-08-19 08:16:32 +03:00
"span": {
"start": 117,
"end": 120,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TypeSelector",
2021-08-19 08:16:32 +03:00
"span": {
"start": 117,
"end": 120,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 117,
"end": 120,
"ctxt": 0
},
"value": "foo",
"raw": "foo"
}
},
"subclassSelectors": []
}
]
}
]
},
2021-08-19 08:16:32 +03:00
"block": {
"type": "Block",
2021-08-19 08:16:32 +03:00
"span": {
"start": 121,
"end": 139,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"items": [
2021-08-19 08:16:32 +03:00
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 124,
"end": 137,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"property": {
"type": "Identifier",
2021-08-19 08:16:32 +03:00
"span": {
"start": 124,
"end": 129,
"ctxt": 0
},
"value": "color",
"raw": "color"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "Identifier",
2021-08-19 08:16:32 +03:00
"span": {
"start": 131,
"end": 137,
"ctxt": 0
},
"value": "yellow",
"raw": "yellow"
2021-08-19 08:16:32 +03:00
}
],
"important": null
}
]
}
},
{
"type": "StyleRule",
"span": {
"start": 141,
"end": 182,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"selectors": {
"type": "SelectorList",
"span": {
"start": 141,
"end": 144,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 141,
"end": 144,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
2021-08-19 08:16:32 +03:00
"span": {
"start": 141,
"end": 144,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TypeSelector",
2021-08-19 08:16:32 +03:00
"span": {
"start": 141,
"end": 144,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 141,
"end": 144,
"ctxt": 0
},
"value": "bar",
"raw": "bar"
}
},
"subclassSelectors": []
}
]
}
]
},
2021-08-19 08:16:32 +03:00
"block": {
"type": "Block",
2021-08-19 08:16:32 +03:00
"span": {
"start": 145,
"end": 182,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"items": [
2021-08-19 08:16:32 +03:00
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 148,
"end": 161,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"property": {
"type": "Identifier",
2021-08-19 08:16:32 +03:00
"span": {
"start": 148,
"end": 153,
"ctxt": 0
},
"value": "color",
"raw": "color"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "Identifier",
2021-08-19 08:16:32 +03:00
"span": {
"start": 155,
"end": 161,
"ctxt": 0
},
"value": "yellow",
"raw": "yellow"
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 164,
"end": 180,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"property": {
"type": "Identifier",
2021-08-19 08:16:32 +03:00
"span": {
"start": 164,
"end": 174,
"ctxt": 0
},
"value": "background",
"raw": "background"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "Identifier",
2021-08-19 08:16:32 +03:00
"span": {
"start": 176,
"end": 180,
"ctxt": 0
},
"value": "none",
"raw": "none"
2021-08-19 08:16:32 +03:00
}
],
"important": null
}
]
}
}
]
}