mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 19:21:33 +03:00
525 lines
12 KiB
JSON
525 lines
12 KiB
JSON
{
|
|
"type": "Stylesheet",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 172,
|
|
"ctxt": 0
|
|
},
|
|
"rules": [
|
|
{
|
|
"type": "QualifiedRule",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 60,
|
|
"ctxt": 0
|
|
},
|
|
"prelude": {
|
|
"type": "SelectorList",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 6,
|
|
"ctxt": 0
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "ComplexSelector",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 6,
|
|
"ctxt": 0
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "CompoundSelector",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 6,
|
|
"ctxt": 0
|
|
},
|
|
"nestingSelector": null,
|
|
"typeSelector": null,
|
|
"subclassSelectors": [
|
|
{
|
|
"type": "PseudoClassSelector",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 6,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Ident",
|
|
"span": {
|
|
"start": 2,
|
|
"end": 6,
|
|
"ctxt": 0
|
|
},
|
|
"value": "root",
|
|
"raw": "root"
|
|
},
|
|
"children": null
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"block": {
|
|
"type": "SimpleBlock",
|
|
"span": {
|
|
"start": 7,
|
|
"end": 60,
|
|
"ctxt": 0
|
|
},
|
|
"name": "{",
|
|
"value": [
|
|
{
|
|
"type": "Declaration",
|
|
"span": {
|
|
"start": 13,
|
|
"end": 31,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "DashedIdent",
|
|
"span": {
|
|
"start": 13,
|
|
"end": 25,
|
|
"ctxt": 0
|
|
},
|
|
"value": "--main-color",
|
|
"raw": "--main-color"
|
|
},
|
|
"value": [
|
|
{
|
|
"type": "PreservedToken",
|
|
"span": {
|
|
"start": 27,
|
|
"end": 31,
|
|
"ctxt": 0
|
|
},
|
|
"token": {
|
|
"Hash": {
|
|
"is_id": false,
|
|
"value": "06c",
|
|
"raw": "06c"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"important": null
|
|
},
|
|
{
|
|
"type": "Declaration",
|
|
"span": {
|
|
"start": 37,
|
|
"end": 57,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "DashedIdent",
|
|
"span": {
|
|
"start": 37,
|
|
"end": 51,
|
|
"ctxt": 0
|
|
},
|
|
"value": "--accent-color",
|
|
"raw": "--accent-color"
|
|
},
|
|
"value": [
|
|
{
|
|
"type": "PreservedToken",
|
|
"span": {
|
|
"start": 53,
|
|
"end": 57,
|
|
"ctxt": 0
|
|
},
|
|
"token": {
|
|
"Hash": {
|
|
"is_id": false,
|
|
"value": "006",
|
|
"raw": "006"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"important": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "QualifiedRule",
|
|
"span": {
|
|
"start": 62,
|
|
"end": 92,
|
|
"ctxt": 0
|
|
},
|
|
"prelude": {
|
|
"type": "SelectorList",
|
|
"span": {
|
|
"start": 62,
|
|
"end": 66,
|
|
"ctxt": 0
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "ComplexSelector",
|
|
"span": {
|
|
"start": 62,
|
|
"end": 66,
|
|
"ctxt": 0
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "CompoundSelector",
|
|
"span": {
|
|
"start": 62,
|
|
"end": 66,
|
|
"ctxt": 0
|
|
},
|
|
"nestingSelector": null,
|
|
"typeSelector": null,
|
|
"subclassSelectors": [
|
|
{
|
|
"type": "ClassSelector",
|
|
"span": {
|
|
"start": 62,
|
|
"end": 66,
|
|
"ctxt": 0
|
|
},
|
|
"text": {
|
|
"type": "Ident",
|
|
"span": {
|
|
"start": 63,
|
|
"end": 66,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"raw": "foo"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"block": {
|
|
"type": "SimpleBlock",
|
|
"span": {
|
|
"start": 67,
|
|
"end": 92,
|
|
"ctxt": 0
|
|
},
|
|
"name": "{",
|
|
"value": [
|
|
{
|
|
"type": "Declaration",
|
|
"span": {
|
|
"start": 73,
|
|
"end": 89,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "DashedIdent",
|
|
"span": {
|
|
"start": 73,
|
|
"end": 83,
|
|
"ctxt": 0
|
|
},
|
|
"value": "--fg-color",
|
|
"raw": "--fg-color"
|
|
},
|
|
"value": [
|
|
{
|
|
"type": "PreservedToken",
|
|
"span": {
|
|
"start": 85,
|
|
"end": 89,
|
|
"ctxt": 0
|
|
},
|
|
"token": {
|
|
"Ident": {
|
|
"value": "blue",
|
|
"raw": "blue"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"important": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "QualifiedRule",
|
|
"span": {
|
|
"start": 94,
|
|
"end": 135,
|
|
"ctxt": 0
|
|
},
|
|
"prelude": {
|
|
"type": "SelectorList",
|
|
"span": {
|
|
"start": 94,
|
|
"end": 101,
|
|
"ctxt": 0
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "ComplexSelector",
|
|
"span": {
|
|
"start": 94,
|
|
"end": 101,
|
|
"ctxt": 0
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "CompoundSelector",
|
|
"span": {
|
|
"start": 94,
|
|
"end": 98,
|
|
"ctxt": 0
|
|
},
|
|
"nestingSelector": null,
|
|
"typeSelector": null,
|
|
"subclassSelectors": [
|
|
{
|
|
"type": "IdSelector",
|
|
"span": {
|
|
"start": 94,
|
|
"end": 98,
|
|
"ctxt": 0
|
|
},
|
|
"text": {
|
|
"type": "Ident",
|
|
"span": {
|
|
"start": 94,
|
|
"end": 98,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"raw": "foo"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "Combinator",
|
|
"span": {
|
|
"start": 98,
|
|
"end": 99,
|
|
"ctxt": 0
|
|
},
|
|
"value": " "
|
|
},
|
|
{
|
|
"type": "CompoundSelector",
|
|
"span": {
|
|
"start": 99,
|
|
"end": 101,
|
|
"ctxt": 0
|
|
},
|
|
"nestingSelector": null,
|
|
"typeSelector": {
|
|
"type": "TagNameSelector",
|
|
"span": {
|
|
"start": 99,
|
|
"end": 101,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "WqName",
|
|
"span": {
|
|
"start": 99,
|
|
"end": 101,
|
|
"ctxt": 0
|
|
},
|
|
"prefix": null,
|
|
"value": {
|
|
"type": "Ident",
|
|
"span": {
|
|
"start": 99,
|
|
"end": 101,
|
|
"ctxt": 0
|
|
},
|
|
"value": "h1",
|
|
"raw": "h1"
|
|
}
|
|
}
|
|
},
|
|
"subclassSelectors": []
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"block": {
|
|
"type": "SimpleBlock",
|
|
"span": {
|
|
"start": 102,
|
|
"end": 135,
|
|
"ctxt": 0
|
|
},
|
|
"name": "{",
|
|
"value": [
|
|
{
|
|
"type": "Declaration",
|
|
"span": {
|
|
"start": 108,
|
|
"end": 132,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Ident",
|
|
"span": {
|
|
"start": 108,
|
|
"end": 113,
|
|
"ctxt": 0
|
|
},
|
|
"value": "color",
|
|
"raw": "color"
|
|
},
|
|
"value": [
|
|
{
|
|
"type": "Function",
|
|
"span": {
|
|
"start": 115,
|
|
"end": 132,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Ident",
|
|
"span": {
|
|
"start": 115,
|
|
"end": 118,
|
|
"ctxt": 0
|
|
},
|
|
"value": "var",
|
|
"raw": "var"
|
|
},
|
|
"value": [
|
|
{
|
|
"type": "DashedIdent",
|
|
"span": {
|
|
"start": 119,
|
|
"end": 131,
|
|
"ctxt": 0
|
|
},
|
|
"value": "--main-color",
|
|
"raw": "--main-color"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"important": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "AtRule",
|
|
"span": {
|
|
"start": 137,
|
|
"end": 149,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "DashedIdent",
|
|
"span": {
|
|
"start": 138,
|
|
"end": 146,
|
|
"ctxt": 0
|
|
},
|
|
"value": "--custom",
|
|
"raw": "--custom"
|
|
},
|
|
"prelude": {
|
|
"type": "ListOfComponentValues",
|
|
"span": {
|
|
"start": 146,
|
|
"end": 147,
|
|
"ctxt": 0
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "PreservedToken",
|
|
"span": {
|
|
"start": 146,
|
|
"end": 147,
|
|
"ctxt": 0
|
|
},
|
|
"token": {
|
|
"WhiteSpace": {
|
|
"value": " "
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"block": {
|
|
"type": "SimpleBlock",
|
|
"span": {
|
|
"start": 147,
|
|
"end": 149,
|
|
"ctxt": 0
|
|
},
|
|
"name": "{",
|
|
"value": []
|
|
}
|
|
},
|
|
{
|
|
"type": "AtRule",
|
|
"span": {
|
|
"start": 150,
|
|
"end": 171,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "DashedIdent",
|
|
"span": {
|
|
"start": 151,
|
|
"end": 168,
|
|
"ctxt": 0
|
|
},
|
|
"value": "--library1-custom",
|
|
"raw": "--library1-custom"
|
|
},
|
|
"prelude": {
|
|
"type": "ListOfComponentValues",
|
|
"span": {
|
|
"start": 168,
|
|
"end": 169,
|
|
"ctxt": 0
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "PreservedToken",
|
|
"span": {
|
|
"start": 168,
|
|
"end": 169,
|
|
"ctxt": 0
|
|
},
|
|
"token": {
|
|
"WhiteSpace": {
|
|
"value": " "
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"block": {
|
|
"type": "SimpleBlock",
|
|
"span": {
|
|
"start": 169,
|
|
"end": 171,
|
|
"ctxt": 0
|
|
},
|
|
"name": "{",
|
|
"value": []
|
|
}
|
|
}
|
|
]
|
|
}
|