swc/crates/swc_css_parser/tests/fixture/rome/custom-properties/output.json

992 lines
25 KiB
JSON
Raw Normal View History

2021-08-19 08:16:32 +03:00
{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 508,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
2021-08-19 08:16:32 +03:00
"span": {
"start": 0,
"end": 507,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 0,
"end": 6,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 6,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 6,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
2021-08-19 08:16:32 +03:00
"span": {
"start": 0,
2021-08-19 08:16:32 +03:00
"end": 6,
"ctxt": 0
},
"text": {
"type": "Ident",
"span": {
"start": 1,
"end": 6,
"ctxt": 0
},
"value": "style",
"raw": "style"
}
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": 7,
"end": 507,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 10,
"end": 22,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 10,
"end": 15,
"ctxt": 0
},
"value": "--foo",
"raw": "--foo"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 17,
2021-08-19 08:16:32 +03:00
"end": 22,
"ctxt": 0
},
"token": {
"Str": {
"value": "bar",
"raw": "'bar'"
}
}
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 25,
"end": 44,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 25,
"end": 37,
"ctxt": 0
},
"value": "--lore-ipsum",
"raw": "--lore-ipsum"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 39,
2021-08-19 08:16:32 +03:00
"end": 44,
"ctxt": 0
},
"token": {
"Str": {
"value": "foo",
"raw": "\"foo\""
}
}
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 47,
"end": 63,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 47,
"end": 54,
"ctxt": 0
},
"value": "--FANCY",
"raw": "--FANCY"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 56,
2021-08-19 08:16:32 +03:00
"end": 63,
"ctxt": 0
},
"token": {
"Str": {
"value": "abort",
"raw": "\"abort\""
}
}
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 66,
"end": 78,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 66,
"end": 72,
"ctxt": 0
},
"value": "--test",
"raw": "--test"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 74,
2021-08-19 08:16:32 +03:00
"end": 78,
"ctxt": 0
},
"token": {
"Num": {
"value": 1987.0,
"raw": "1987",
"type": "integer"
}
}
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 81,
"end": 98,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 81,
"end": 93,
"ctxt": 0
},
"value": "--percentage",
"raw": "--percentage"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 95,
"end": 98,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"token": {
"Percentage": {
"value": 25.0,
"raw": "25"
}
}
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 101,
"end": 113,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 101,
"end": 109,
"ctxt": 0
},
"value": "--number",
"raw": "--number"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 111,
2021-08-19 08:16:32 +03:00
"end": 113,
"ctxt": 0
},
"token": {
"Num": {
"value": 37.0,
"raw": "37",
"type": "integer"
}
}
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 116,
"end": 130,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 116,
"end": 124,
"ctxt": 0
},
"value": "--length",
"raw": "--length"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 126,
"end": 130,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"token": {
"Dimension": {
"value": 12.0,
"raw_value": "12",
"unit": "em",
"raw_unit": "em",
"type": "integer"
}
}
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 133,
"end": 145,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 133,
"end": 139,
"ctxt": 0
},
"value": "--time",
"raw": "--time"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 141,
"end": 145,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"token": {
"Dimension": {
"value": 75.0,
"raw_value": "75",
"unit": "ms",
"raw_unit": "ms",
"type": "integer"
}
}
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 148,
"end": 164,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 148,
"end": 158,
"ctxt": 0
},
"value": "--function",
"raw": "--function"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 160,
"end": 164,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"token": {
"Function": {
"value": "foo",
"raw": "foo"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 164,
"end": 165,
"ctxt": 0
},
"token": "RParen"
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 168,
"end": 191,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 168,
"end": 185,
"ctxt": 0
},
"value": "--nested-function",
"raw": "--nested-function"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 187,
"end": 191,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"token": {
"Function": {
"value": "foo",
"raw": "foo"
2021-08-19 08:16:32 +03:00
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 191,
"end": 195,
"ctxt": 0
},
"token": {
"Function": {
"value": "bar",
"raw": "bar"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 195,
"end": 196,
"ctxt": 0
},
"token": "RParen"
},
{
"type": "PreservedToken",
"span": {
"start": 196,
"end": 197,
"ctxt": 0
},
"token": "RParen"
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 200,
"end": 216,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 200,
"end": 213,
"ctxt": 0
},
"value": "--parentheses",
"raw": "--parentheses"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 215,
"end": 216,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"token": "LParen"
},
{
"type": "PreservedToken",
"span": {
"start": 216,
"end": 217,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 217,
"end": 218,
"ctxt": 0
},
"token": "RParen"
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 221,
"end": 232,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 221,
"end": 229,
"ctxt": 0
},
"value": "--braces",
"raw": "--braces"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 231,
"end": 232,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"token": "LBrace"
},
{
"type": "PreservedToken",
"span": {
"start": 232,
"end": 233,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 233,
"end": 234,
"ctxt": 0
},
"token": "RBrace"
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 237,
"end": 250,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 237,
"end": 247,
"ctxt": 0
},
"value": "--brackets",
"raw": "--brackets"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 249,
"end": 250,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"token": "LBracket"
},
{
"type": "PreservedToken",
"span": {
"start": 250,
"end": 251,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 251,
"end": 252,
"ctxt": 0
},
"token": "RBracket"
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 255,
"end": 284,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 255,
"end": 275,
"ctxt": 0
},
"value": "--at-keyword-unknown",
"raw": "--at-keyword-unknown"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 277,
"end": 284,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"token": {
"AtKeyword": {
"value": "foobar",
"raw": "foobar"
}
}
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 287,
"end": 313,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 287,
"end": 305,
"ctxt": 0
},
"value": "--at-keyword-known",
"raw": "--at-keyword-known"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 307,
"end": 313,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"token": {
"AtKeyword": {
"value": "media",
"raw": "media"
}
}
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 316,
"end": 351,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 316,
"end": 342,
"ctxt": 0
},
"value": "--at-keyword-unknown-block",
"raw": "--at-keyword-unknown-block"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 344,
"end": 351,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"token": {
"AtKeyword": {
"value": "foobar",
"raw": "foobar"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 351,
"end": 352,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 352,
"end": 353,
"ctxt": 0
},
"token": "LBrace"
},
{
"type": "PreservedToken",
"span": {
"start": 353,
"end": 354,
"ctxt": 0
},
"token": "RBrace"
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 357,
"end": 389,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 357,
"end": 381,
"ctxt": 0
},
"value": "--at-keyword-known-block",
"raw": "--at-keyword-known-block"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 383,
"end": 389,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"token": {
"AtKeyword": {
"value": "media",
"raw": "media"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 389,
"end": 390,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 390,
"end": 391,
"ctxt": 0
},
"token": "LBrace"
},
{
"type": "PreservedToken",
"span": {
"start": 391,
"end": 392,
"ctxt": 0
},
"token": "RBrace"
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 395,
"end": 419,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 395,
"end": 413,
"ctxt": 0
},
"value": "--cdo-at-top-level",
"raw": "--cdo-at-top-level"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 415,
2021-08-19 08:16:32 +03:00
"end": 419,
"ctxt": 0
},
"token": "CDO"
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 422,
"end": 445,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 422,
"end": 440,
"ctxt": 0
},
"value": "--cdc-at-top-level",
"raw": "--cdc-at-top-level"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 442,
2021-08-19 08:16:32 +03:00
"end": 445,
"ctxt": 0
},
"token": "CDC"
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 448,
"end": 470,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 448,
"end": 467,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"value": "--cdo-not-top-level",
"raw": "--cdo-not-top-level"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 469,
"end": 470,
"ctxt": 0
},
"token": "LParen"
},
{
"type": "PreservedToken",
"span": {
"start": 470,
"end": 474,
"ctxt": 0
},
"token": "CDO"
},
{
"type": "PreservedToken",
"span": {
"start": 474,
"end": 475,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"token": "RParen"
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 478,
"end": 500,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "DashedIdent",
2021-08-19 08:16:32 +03:00
"span": {
"start": 478,
"end": 497,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"value": "--cdc-not-top-level",
"raw": "--cdc-not-top-level"
2021-08-19 08:16:32 +03:00
},
"value": [
2021-08-19 08:16:32 +03:00
{
"type": "PreservedToken",
2021-08-19 08:16:32 +03:00
"span": {
"start": 499,
"end": 500,
"ctxt": 0
},
"token": "LParen"
},
{
"type": "PreservedToken",
"span": {
"start": 500,
"end": 503,
"ctxt": 0
},
"token": "CDC"
},
{
"type": "PreservedToken",
"span": {
"start": 503,
"end": 504,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"token": "RParen"
2021-08-19 08:16:32 +03:00
}
],
"important": null
}
]
}
}
]
}