swc/crates/swc_css_parser/tests/fixture/at-rule/layer/output.json

1710 lines
46 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 904,
"ctxt": 0
},
"rules": [
{
"type": "LayerRule",
"span": {
"start": 0,
"end": 52,
"ctxt": 0
},
"prelude": {
"type": "LayerNameList",
"span": {
"start": 7,
"end": 49,
"ctxt": 0
},
"nameList": [
{
"type": "LayerName",
"span": {
"start": 7,
"end": 16,
"ctxt": 0
},
"name": [
{
"type": "Ident",
"span": {
"start": 7,
"end": 16,
"ctxt": 0
},
"value": "framework",
"raw": "framework"
}
]
},
{
"type": "LayerName",
"span": {
"start": 18,
"end": 26,
"ctxt": 0
},
"name": [
{
"type": "Ident",
"span": {
"start": 18,
"end": 26,
"ctxt": 0
},
"value": "override",
"raw": "override"
}
]
},
{
"type": "LayerName",
"span": {
"start": 34,
"end": 37,
"ctxt": 0
},
"name": [
{
"type": "Ident",
"span": {
"start": 34,
"end": 37,
"ctxt": 0
},
"value": "foo",
"raw": "foo"
}
]
},
{
"type": "LayerName",
"span": {
"start": 42,
"end": 49,
"ctxt": 0
},
"name": [
{
"type": "Ident",
"span": {
"start": 42,
"end": 45,
"ctxt": 0
},
"value": "bar",
"raw": "bar"
},
{
"type": "Ident",
"span": {
"start": 46,
"end": 49,
"ctxt": 0
},
"value": "baz",
"raw": "baz"
}
]
}
]
},
"rules": null
},
{
"type": "LayerRule",
"span": {
"start": 54,
"end": 173,
"ctxt": 0
},
"prelude": {
"type": "LayerName",
"span": {
"start": 61,
"end": 69,
"ctxt": 0
},
"name": [
{
"type": "Ident",
"span": {
"start": 61,
"end": 69,
"ctxt": 0
},
"value": "override",
"raw": "override"
}
]
},
"rules": [
{
"type": "KeyframesRule",
"span": {
"start": 76,
"end": 171,
"ctxt": 0
},
"name": {
"type": "CustomIdent",
"span": {
"start": 87,
"end": 97,
"ctxt": 0
},
"value": "slide-left",
"raw": "slide-left"
},
"blocks": [
{
"span": {
"start": 108,
"end": 130,
"ctxt": 0
},
"prelude": [
{
"type": "Ident",
"span": {
"start": 108,
"end": 112,
"ctxt": 0
},
"value": "from",
"raw": "from"
}
],
"block": {
"type": "SimpleBlock",
"span": {
"start": 113,
"end": 130,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 115,
"end": 127,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 115,
"end": 124,
"ctxt": 0
},
"value": "translate",
"raw": "translate"
},
"value": [
{
"type": "Number",
"span": {
"start": 126,
"end": 127,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"important": null
}
]
}
},
{
"span": {
"start": 139,
"end": 165,
"ctxt": 0
},
"prelude": [
{
"type": "Ident",
"span": {
"start": 139,
"end": 141,
"ctxt": 0
},
"value": "to",
"raw": "to"
}
],
"block": {
"type": "SimpleBlock",
"span": {
"start": 142,
"end": 165,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 144,
"end": 162,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 144,
"end": 153,
"ctxt": 0
},
"value": "translate",
"raw": "translate"
},
"value": [
{
"type": "Percentage",
"span": {
"start": 155,
"end": 160,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 155,
"end": 159,
"ctxt": 0
},
"value": -100.0,
"raw": "-100"
}
},
{
"type": "Number",
"span": {
"start": 161,
"end": 162,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"important": null
}
]
}
}
]
}
]
},
{
"type": "LayerRule",
"span": {
"start": 175,
"end": 297,
"ctxt": 0
},
"prelude": {
"type": "LayerName",
"span": {
"start": 182,
"end": 191,
"ctxt": 0
},
"name": [
{
"type": "Ident",
"span": {
"start": 182,
"end": 191,
"ctxt": 0
},
"value": "framework",
"raw": "framework"
}
]
},
"rules": [
{
"type": "KeyframesRule",
"span": {
"start": 198,
"end": 295,
"ctxt": 0
},
"name": {
"type": "CustomIdent",
"span": {
"start": 209,
"end": 219,
"ctxt": 0
},
"value": "slide-left",
"raw": "slide-left"
},
"blocks": [
{
"span": {
"start": 230,
"end": 254,
"ctxt": 0
},
"prelude": [
{
"type": "Ident",
"span": {
"start": 230,
"end": 234,
"ctxt": 0
},
"value": "from",
"raw": "from"
}
],
"block": {
"type": "SimpleBlock",
"span": {
"start": 235,
"end": 254,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 237,
"end": 251,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 237,
"end": 248,
"ctxt": 0
},
"value": "margin-left",
"raw": "margin-left"
},
"value": [
{
"type": "Number",
"span": {
"start": 250,
"end": 251,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"important": null
}
]
}
},
{
"span": {
"start": 263,
"end": 289,
"ctxt": 0
},
"prelude": [
{
"type": "Ident",
"span": {
"start": 263,
"end": 265,
"ctxt": 0
},
"value": "to",
"raw": "to"
}
],
"block": {
"type": "SimpleBlock",
"span": {
"start": 266,
"end": 289,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 268,
"end": 286,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 268,
"end": 279,
"ctxt": 0
},
"value": "margin-left",
"raw": "margin-left"
},
"value": [
{
"type": "Percentage",
"span": {
"start": 281,
"end": 286,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 281,
"end": 285,
"ctxt": 0
},
"value": -100.0,
"raw": "-100"
}
}
],
"important": null
}
]
}
}
]
}
]
},
{
"type": "QualifiedRule",
"span": {
"start": 299,
"end": 340,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 299,
"end": 307,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 299,
"end": 307,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 299,
"end": 307,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
"span": {
"start": 299,
"end": 307,
"ctxt": 0
},
"text": {
"type": "Ident",
"span": {
"start": 300,
"end": 307,
"ctxt": 0
},
"value": "sidebar",
"raw": "sidebar"
}
}
]
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 308,
"end": 340,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 310,
"end": 337,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 310,
"end": 319,
"ctxt": 0
},
"value": "animation",
"raw": "animation"
},
"value": [
{
"type": "Ident",
"span": {
"start": 321,
"end": 331,
"ctxt": 0
},
"value": "slide-left",
"raw": "slide-left"
},
{
"type": "Time",
"span": {
"start": 332,
"end": 337,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 332,
"end": 335,
"ctxt": 0
},
"value": 300.0,
"raw": "300"
},
"unit": {
"type": "Ident",
"span": {
"start": 335,
"end": 337,
"ctxt": 0
},
"value": "ms",
"raw": "ms"
}
}
],
"important": null
}
]
}
},
{
"type": "LayerRule",
"span": {
"start": 342,
"end": 366,
"ctxt": 0
},
"prelude": null,
"rules": []
},
{
"type": "LayerRule",
"span": {
"start": 367,
"end": 391,
"ctxt": 0
},
"prelude": null,
"rules": []
},
{
"type": "LayerRule",
"span": {
"start": 393,
"end": 448,
"ctxt": 0
},
"prelude": {
"type": "LayerName",
"span": {
"start": 400,
"end": 410,
"ctxt": 0
},
"name": [
{
"type": "Ident",
"span": {
"start": 400,
"end": 405,
"ctxt": 0
},
"value": "reset",
"raw": "reset"
},
{
"type": "Ident",
"span": {
"start": 406,
"end": 410,
"ctxt": 0
},
"value": "type",
"raw": "type"
}
]
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 417,
"end": 446,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 417,
"end": 423,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 417,
"end": 423,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 417,
"end": 423,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TagNameSelector",
"span": {
"start": 417,
"end": 423,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 417,
"end": 423,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Ident",
"span": {
"start": 417,
"end": 423,
"ctxt": 0
},
"value": "strong",
"raw": "strong"
}
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 424,
"end": 446,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 426,
"end": 443,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 426,
"end": 437,
"ctxt": 0
},
"value": "font-weight",
"raw": "font-weight"
},
"value": [
{
"type": "Ident",
"span": {
"start": 439,
"end": 443,
"ctxt": 0
},
"value": "bold",
"raw": "bold"
}
],
"important": null
}
]
}
}
]
},
{
"type": "LayerRule",
"span": {
"start": 450,
"end": 563,
"ctxt": 0
},
"prelude": {
"type": "LayerName",
"span": {
"start": 457,
"end": 466,
"ctxt": 0
},
"name": [
{
"type": "Ident",
"span": {
"start": 457,
"end": 466,
"ctxt": 0
},
"value": "framework",
"raw": "framework"
}
]
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 473,
"end": 501,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 473,
"end": 479,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 473,
"end": 479,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 473,
"end": 479,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
"span": {
"start": 473,
"end": 479,
"ctxt": 0
},
"text": {
"type": "Ident",
"span": {
"start": 474,
"end": 479,
"ctxt": 0
},
"value": "title",
"raw": "title"
}
}
]
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 480,
"end": 501,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 482,
"end": 498,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 482,
"end": 493,
"ctxt": 0
},
"value": "font-weight",
"raw": "font-weight"
},
"value": [
{
"type": "Number",
"span": {
"start": 495,
"end": 498,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
}
],
"important": null
}
]
}
},
{
"type": "LayerRule",
"span": {
"start": 507,
"end": 561,
"ctxt": 0
},
"prelude": {
"type": "LayerName",
"span": {
"start": 514,
"end": 519,
"ctxt": 0
},
"name": [
{
"type": "Ident",
"span": {
"start": 514,
"end": 519,
"ctxt": 0
},
"value": "theme",
"raw": "theme"
}
]
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 530,
"end": 555,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 530,
"end": 536,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 530,
"end": 532,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 530,
"end": 532,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TagNameSelector",
"span": {
"start": 530,
"end": 532,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 530,
"end": 532,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Ident",
"span": {
"start": 530,
"end": 532,
"ctxt": 0
},
"value": "h1",
"raw": "h1"
}
}
},
"subclassSelectors": []
}
]
},
{
"type": "ComplexSelector",
"span": {
"start": 534,
"end": 536,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 534,
"end": 536,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TagNameSelector",
"span": {
"start": 534,
"end": 536,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 534,
"end": 536,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Ident",
"span": {
"start": 534,
"end": 536,
"ctxt": 0
},
"value": "h2",
"raw": "h2"
}
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 537,
"end": 555,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 539,
"end": 552,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 539,
"end": 544,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Ident",
"span": {
"start": 546,
"end": 552,
"ctxt": 0
},
"value": "maroon",
"raw": "maroon"
}
],
"important": null
}
]
}
}
]
}
]
},
{
"type": "LayerRule",
"span": {
"start": 565,
"end": 613,
"ctxt": 0
},
"prelude": {
"type": "LayerName",
"span": {
"start": 572,
"end": 577,
"ctxt": 0
},
"name": [
{
"type": "Ident",
"span": {
"start": 572,
"end": 577,
"ctxt": 0
},
"value": "reset",
"raw": "reset"
}
]
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 584,
"end": 611,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 584,
"end": 592,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 584,
"end": 592,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 584,
"end": 592,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "AttributeSelector",
"span": {
"start": 584,
"end": 592,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 585,
"end": 591,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Ident",
"span": {
"start": 585,
"end": 591,
"ctxt": 0
},
"value": "hidden",
"raw": "hidden"
}
},
"matcher": null,
"value": null,
"modifier": null
}
]
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 593,
"end": 611,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 595,
"end": 608,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 595,
"end": 602,
"ctxt": 0
},
"value": "display",
"raw": "display"
},
"value": [
{
"type": "Ident",
"span": {
"start": 604,
"end": 608,
"ctxt": 0
},
"value": "none",
"raw": "none"
}
],
"important": null
}
]
}
}
]
},
{
"type": "LayerRule",
"span": {
"start": 615,
"end": 751,
"ctxt": 0
},
"prelude": {
"type": "LayerName",
"span": {
"start": 622,
"end": 631,
"ctxt": 0
},
"name": [
{
"type": "Ident",
"span": {
"start": 622,
"end": 631,
"ctxt": 0
},
"value": "framework",
"raw": "framework"
}
]
},
"rules": [
{
"type": "LayerRule",
"span": {
"start": 638,
"end": 696,
"ctxt": 0
},
"prelude": {
"type": "LayerName",
"span": {
"start": 645,
"end": 652,
"ctxt": 0
},
"name": [
{
"type": "Ident",
"span": {
"start": 645,
"end": 652,
"ctxt": 0
},
"value": "default",
"raw": "default"
}
]
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 663,
"end": 690,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 663,
"end": 664,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 663,
"end": 664,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 663,
"end": 664,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TagNameSelector",
"span": {
"start": 663,
"end": 664,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 663,
"end": 664,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Ident",
"span": {
"start": 663,
"end": 664,
"ctxt": 0
},
"value": "p",
"raw": "p"
}
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 665,
"end": 690,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 667,
"end": 687,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 667,
"end": 679,
"ctxt": 0
},
"value": "margin-block",
"raw": "margin-block"
},
"value": [
{
"type": "Length",
"span": {
"start": 681,
"end": 687,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 681,
"end": 685,
"ctxt": 0
},
"value": 0.75,
"raw": "0.75"
},
"unit": {
"type": "Ident",
"span": {
"start": 685,
"end": 687,
"ctxt": 0
},
"value": "em",
"raw": "em"
}
}
],
"important": null
}
]
}
}
]
},
{
"type": "LayerRule",
"span": {
"start": 702,
"end": 749,
"ctxt": 0
},
"prelude": {
"type": "LayerName",
"span": {
"start": 709,
"end": 714,
"ctxt": 0
},
"name": [
{
"type": "Ident",
"span": {
"start": 709,
"end": 714,
"ctxt": 0
},
"value": "theme",
"raw": "theme"
}
]
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 725,
"end": 743,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 725,
"end": 726,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 725,
"end": 726,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 725,
"end": 726,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TagNameSelector",
"span": {
"start": 725,
"end": 726,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 725,
"end": 726,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Ident",
"span": {
"start": 725,
"end": 726,
"ctxt": 0
},
"value": "p",
"raw": "p"
}
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 727,
"end": 743,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 729,
"end": 740,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 729,
"end": 734,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "HexColor",
"span": {
"start": 736,
"end": 740,
"ctxt": 0
},
"value": "222",
"raw": "222"
}
],
"important": null
}
]
}
}
]
}
]
},
{
"type": "LayerRule",
"span": {
"start": 753,
"end": 903,
"ctxt": 0
},
"prelude": {
"type": "LayerName",
"span": {
"start": 760,
"end": 775,
"ctxt": 0
},
"name": [
{
"type": "Ident",
"span": {
"start": 760,
"end": 769,
"ctxt": 0
},
"value": "framework",
"raw": "framework"
},
{
"type": "Ident",
"span": {
"start": 770,
"end": 775,
"ctxt": 0
},
"value": "theme",
"raw": "theme"
}
]
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 865,
"end": 901,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 865,
"end": 875,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 865,
"end": 875,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 865,
"end": 875,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TagNameSelector",
"span": {
"start": 865,
"end": 875,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 865,
"end": 875,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Ident",
"span": {
"start": 865,
"end": 875,
"ctxt": 0
},
"value": "blockquote",
"raw": "blockquote"
}
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 876,
"end": 901,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 878,
"end": 898,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 878,
"end": 883,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Ident",
"span": {
"start": 885,
"end": 898,
"ctxt": 0
},
"value": "rebeccapurple",
"raw": "rebeccapurple"
}
],
"important": null
}
]
}
}
]
}
]
}