swc/css/parser/tests/fixture/rome/values/output.json

540 lines
12 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": 35,
"ctxt": 0
},
"selectors": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 10,
"ctxt": 0
},
"selectors": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"hasNestPrefix": false,
"combinator": null,
"typeSelector": {
"type": "NamespacedName",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"value": "p"
}
},
"subclassSelectors": [
{
"type": "PseudoSelector",
"span": {
"start": 0,
"end": 2,
"ctxt": 0
},
"isElement": true,
"name": {
"type": "Text",
"span": {
"start": 0,
"end": 2,
"ctxt": 0
},
"value": ""
},
"args": {
"type": "Tokens",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"tokens": []
}
}
]
}
]
}
],
"block": {
"type": "DeclBlock",
"span": {
"start": 10,
"end": 35,
"ctxt": 0
},
"properties": [
{
"type": "Property",
"span": {
"start": 13,
"end": 22,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 13,
"end": 20,
"ctxt": 0
},
"value": "content"
},
"values": [
{
"type": "String",
"span": {
"start": 22,
"end": 33,
"ctxt": 0
},
"value": " content "
}
],
"important": null
}
]
}
},
{
"type": "StyleRule",
"span": {
"start": 38,
"end": 114,
"ctxt": 0
},
"selectors": [
{
"type": "ComplexSelector",
"span": {
"start": 38,
"end": 46,
"ctxt": 0
},
"selectors": [
{
"type": "CompoundSelector",
"span": {
"start": 38,
"end": 38,
"ctxt": 0
},
"hasNestPrefix": false,
"combinator": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
"span": {
"start": 38,
"end": 38,
"ctxt": 0
},
"text": {
"type": "Text",
"span": {
"start": 39,
"end": 45,
"ctxt": 0
},
"value": "number"
}
}
]
}
]
}
],
"block": {
"type": "DeclBlock",
"span": {
"start": 46,
"end": 114,
"ctxt": 0
},
"properties": [
{
"type": "Property",
"span": {
"start": 49,
"end": 58,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 49,
"end": 56,
"ctxt": 0
},
"value": "opacity"
},
"values": [
{
"type": "UnitValue",
"span": {
"start": 58,
"end": 58,
"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": 78,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 65,
"end": 76,
"ctxt": 0
},
"value": "line-height"
},
"values": [
{
"type": "Number",
"span": {
"start": 78,
"end": 81,
"ctxt": 0
},
"value": 0.2
}
],
"important": null
},
{
"type": "Property",
"span": {
"start": 84,
"end": 91,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 84,
"end": 89,
"ctxt": 0
},
"value": "width"
},
"values": [
{
"type": "PercentValue",
"span": {
"start": 91,
"end": 91,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 91,
"end": 93,
"ctxt": 0
},
"value": 20.0
}
}
],
"important": null
},
{
"type": "Property",
"span": {
"start": 97,
"end": 109,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 97,
"end": 107,
"ctxt": 0
},
"value": "margin-top"
},
"values": [
{
"type": "PercentValue",
"span": {
"start": 109,
"end": 109,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 109,
"end": 111,
"ctxt": 0
},
"value": -5.0
}
}
],
"important": null
}
]
}
},
{
"type": "StyleRule",
"span": {
"start": 117,
"end": 138,
"ctxt": 0
},
"selectors": [
{
"type": "ComplexSelector",
"span": {
"start": 117,
"end": 121,
"ctxt": 0
},
"selectors": [
{
"type": "CompoundSelector",
"span": {
"start": 117,
"end": 117,
"ctxt": 0
},
"hasNestPrefix": false,
"combinator": null,
"typeSelector": {
"type": "NamespacedName",
"span": {
"start": 117,
"end": 117,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 117,
"end": 120,
"ctxt": 0
},
"value": "foo"
}
},
"subclassSelectors": []
}
]
}
],
"block": {
"type": "DeclBlock",
"span": {
"start": 121,
"end": 138,
"ctxt": 0
},
"properties": [
{
"type": "Property",
"span": {
"start": 124,
"end": 138,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 124,
"end": 129,
"ctxt": 0
},
"value": "color"
},
"values": [
{
"type": "Text",
"span": {
"start": 131,
"end": 137,
"ctxt": 0
},
"value": "yellow"
}
],
"important": null
}
]
}
},
{
"type": "StyleRule",
"span": {
"start": 141,
"end": 181,
"ctxt": 0
},
"selectors": [
{
"type": "ComplexSelector",
"span": {
"start": 141,
"end": 145,
"ctxt": 0
},
"selectors": [
{
"type": "CompoundSelector",
"span": {
"start": 141,
"end": 141,
"ctxt": 0
},
"hasNestPrefix": false,
"combinator": null,
"typeSelector": {
"type": "NamespacedName",
"span": {
"start": 141,
"end": 141,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 141,
"end": 144,
"ctxt": 0
},
"value": "bar"
}
},
"subclassSelectors": []
}
]
}
],
"block": {
"type": "DeclBlock",
"span": {
"start": 145,
"end": 181,
"ctxt": 0
},
"properties": [
{
"type": "Property",
"span": {
"start": 148,
"end": 155,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 148,
"end": 153,
"ctxt": 0
},
"value": "color"
},
"values": [
{
"type": "Text",
"span": {
"start": 155,
"end": 161,
"ctxt": 0
},
"value": "yellow"
}
],
"important": null
},
{
"type": "Property",
"span": {
"start": 164,
"end": 181,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 164,
"end": 174,
"ctxt": 0
},
"value": "background"
},
"values": [
{
"type": "Text",
"span": {
"start": 176,
"end": 180,
"ctxt": 0
},
"value": "none"
}
],
"important": null
}
]
}
}
]
}