swc/css/parser/tests/fixture/rome/custom-properties/output.json

951 lines
24 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": "StyleRule",
"span": {
"start": 0,
"end": 507,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"selectors": {
"type": "SelectorList",
"span": {
"start": 0,
"end": 6,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 6,
"ctxt": 0
},
"selectors": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 6,
"ctxt": 0
},
"nestingSelector": null,
"combinator": 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": "Text",
"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
},
"items": [
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
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "String",
"span": {
"start": 17,
"end": 22,
"ctxt": 0
},
"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
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "String",
"span": {
"start": 39,
"end": 44,
"ctxt": 0
},
"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
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "String",
"span": {
"start": 56,
"end": 63,
"ctxt": 0
},
"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
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "Number",
"span": {
"start": 74,
"end": 78,
"ctxt": 0
},
"value": 1987.0,
"raw": "1987"
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
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "PercentValue",
"span": {
"start": 95,
"end": 98,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 95,
"end": 97,
"ctxt": 0
},
"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
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "Number",
"span": {
"start": 111,
"end": 113,
"ctxt": 0
},
"value": 37.0,
"raw": "37"
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
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "UnitValue",
"span": {
"start": 126,
"end": 130,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 126,
"end": 128,
"ctxt": 0
},
"value": 12.0,
"raw": "12"
2021-08-19 08:16:32 +03:00
},
"unit": {
"span": {
"start": 128,
"end": 130,
"ctxt": 0
},
"value": "em",
"raw": "em"
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
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "UnitValue",
"span": {
"start": 141,
"end": 145,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 141,
"end": 143,
"ctxt": 0
},
"value": 75.0,
"raw": "75"
2021-08-19 08:16:32 +03:00
},
"unit": {
"span": {
"start": 143,
"end": 145,
"ctxt": 0
},
"value": "ms",
"raw": "ms"
2021-08-19 08:16:32 +03:00
}
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 148,
"end": 165,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "FnValue",
"span": {
"start": 160,
"end": 165,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 160,
"end": 163,
"ctxt": 0
},
"value": "foo",
"raw": "foo"
2021-08-19 08:16:32 +03:00
},
"args": []
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 168,
"end": 197,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "FnValue",
"span": {
"start": 187,
"end": 197,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 187,
"end": 190,
"ctxt": 0
},
"value": "foo",
"raw": "foo"
2021-08-19 08:16:32 +03:00
},
"args": [
{
"type": "FnValue",
"span": {
"start": 191,
"end": 196,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 191,
"end": 194,
"ctxt": 0
},
"value": "bar",
"raw": "bar"
2021-08-19 08:16:32 +03:00
},
"args": []
}
]
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 200,
"end": 218,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "RoundBracketBlock",
2021-08-19 08:16:32 +03:00
"span": {
"start": 215,
"end": 218,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"children": null
2021-08-19 08:16:32 +03:00
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 221,
"end": 234,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "BraceValue",
"span": {
"start": 231,
"end": 234,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"value": {
"type": "Tokens",
"span": {
"start": 232,
"end": 233,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"tokens": [
{
"span": {
"start": 232,
"end": 233,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
2021-08-19 08:16:32 +03:00
}
]
}
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 237,
"end": 252,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "SquareBracketBlock",
2021-08-19 08:16:32 +03:00
"span": {
"start": 249,
"end": 252,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"children": []
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
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "AtTextValue",
"span": {
"start": 277,
"end": 284,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 277,
"end": 284,
"ctxt": 0
},
"value": "foobar",
"raw": "foobar"
2021-08-19 08:16:32 +03:00
},
"block": null
}
],
"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
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "AtTextValue",
"span": {
"start": 307,
"end": 313,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 307,
"end": 313,
"ctxt": 0
},
"value": "media",
"raw": "media"
2021-08-19 08:16:32 +03:00
},
"block": null
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 316,
"end": 354,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "AtTextValue",
"span": {
"start": 344,
"end": 351,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 344,
"end": 351,
"ctxt": 0
},
"value": "foobar",
"raw": "foobar"
2021-08-19 08:16:32 +03:00
},
"block": null
},
{
"type": "BraceValue",
"span": {
"start": 352,
"end": 354,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"value": {
"type": "Tokens",
"span": {
"start": 353,
2021-08-19 08:16:32 +03:00
"end": 353,
"ctxt": 0
},
"tokens": []
}
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 357,
"end": 392,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "AtTextValue",
"span": {
"start": 383,
"end": 389,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 383,
"end": 389,
"ctxt": 0
},
"value": "media",
"raw": "media"
2021-08-19 08:16:32 +03:00
},
"block": null
},
{
"type": "BraceValue",
"span": {
"start": 390,
"end": 392,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"value": {
"type": "Tokens",
"span": {
"start": 391,
2021-08-19 08:16:32 +03:00
"end": 391,
"ctxt": 0
},
"tokens": []
}
}
],
"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
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "Tokens",
"span": {
"start": 415,
"end": 419,
"ctxt": 0
},
"tokens": [
{
"span": {
"start": 415,
"end": 419,
"ctxt": 0
},
"token": "CDO"
}
]
}
],
"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
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "Tokens",
"span": {
"start": 442,
"end": 445,
"ctxt": 0
},
"tokens": [
{
"span": {
"start": 442,
"end": 445,
"ctxt": 0
},
"token": "CDC"
}
]
}
],
"important": null
},
{
"type": "Declaration",
2021-08-19 08:16:32 +03:00
"span": {
"start": 448,
"end": 475,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "RoundBracketBlock",
2021-08-19 08:16:32 +03:00
"span": {
"start": 469,
"end": 475,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"children": [
{
"type": "Tokens",
"span": {
"start": 470,
"end": 474,
"ctxt": 0
},
"tokens": [
{
"span": {
"start": 470,
"end": 474,
"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": 478,
"end": 504,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"property": {
2021-08-19 08:16:32 +03:00
"type": "Text",
"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": "RoundBracketBlock",
2021-08-19 08:16:32 +03:00
"span": {
"start": 499,
"end": 504,
2021-08-19 08:16:32 +03:00
"ctxt": 0
},
"children": [
{
"type": "Tokens",
"span": {
"start": 500,
"end": 503,
"ctxt": 0
},
"tokens": [
{
"span": {
"start": 500,
"end": 503,
"ctxt": 0
},
"token": "CDC"
}
]
}
]
2021-08-19 08:16:32 +03:00
}
],
"important": null
}
]
}
}
]
}