swc/crates/swc_css_parser/tests/fixture/declaration/output.json

1297 lines
33 KiB
JSON
Raw Normal View History

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 499,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 0,
"end": 498,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TagNameSelector",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Identifier",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"value": "div",
"raw": "div"
}
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 4,
"end": 498,
"ctxt": 0
},
"value": [
{
"type": "Declaration",
"span": {
"start": 10,
"end": 21,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 10,
"end": 14,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "Identifier",
"span": {
"start": 16,
"end": 21,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 27,
"end": 40,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 27,
"end": 31,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 33,
"end": 40,
"ctxt": 0
},
"name": "(",
"value": [
{
"type": "Identifier",
"span": {
"start": 34,
"end": 39,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 46,
"end": 59,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 46,
"end": 50,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 52,
"end": 59,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Tokens",
"span": {
"start": 53,
"end": 58,
"ctxt": 0
},
"tokens": [
{
"span": {
"start": 53,
"end": 58,
"ctxt": 0
},
"token": {
"Ident": {
"value": "value",
"raw": "value"
}
}
}
]
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 65,
"end": 78,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 65,
"end": 69,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 71,
"end": 78,
"ctxt": 0
},
"name": "[",
"value": [
{
"type": "Identifier",
"span": {
"start": 72,
"end": 77,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 84,
"end": 99,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 84,
"end": 88,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "Function",
"span": {
"start": 90,
"end": 99,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 90,
"end": 92,
"ctxt": 0
},
"value": "fn",
"raw": "fn"
},
"value": [
{
"type": "Identifier",
"span": {
"start": 93,
"end": 98,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 105,
"end": 129,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 105,
"end": 109,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "Function",
"span": {
"start": 111,
"end": 120,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 111,
"end": 113,
"ctxt": 0
},
"value": "fn",
"raw": "fn"
},
"value": [
{
"type": "Identifier",
"span": {
"start": 114,
"end": 119,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
]
},
{
"type": "Function",
"span": {
"start": 120,
"end": 129,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 120,
"end": 122,
"ctxt": 0
},
"value": "fn",
"raw": "fn"
},
"value": [
{
"type": "Identifier",
"span": {
"start": 123,
"end": 128,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 135,
"end": 153,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 135,
"end": 139,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "Identifier",
"span": {
"start": 141,
"end": 146,
"ctxt": 0
},
"value": "value",
"raw": "value"
},
{
"type": "Delimiter",
"span": {
"start": 146,
"end": 147,
"ctxt": 0
},
"value": ","
},
{
"type": "Identifier",
"span": {
"start": 148,
"end": 153,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 159,
"end": 177,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 159,
"end": 163,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "Identifier",
"span": {
"start": 165,
"end": 170,
"ctxt": 0
},
"value": "value",
"raw": "value"
},
{
"type": "Delimiter",
"span": {
"start": 171,
"end": 172,
"ctxt": 0
},
"value": ","
},
{
"type": "Identifier",
"span": {
"start": 172,
"end": 177,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 183,
"end": 200,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 183,
"end": 187,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "Identifier",
"span": {
"start": 189,
"end": 194,
"ctxt": 0
},
"value": "value",
"raw": "value"
},
{
"type": "Delimiter",
"span": {
"start": 194,
"end": 195,
"ctxt": 0
},
"value": ","
},
{
"type": "Identifier",
"span": {
"start": 195,
"end": 200,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 206,
"end": 225,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 206,
"end": 210,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "Identifier",
"span": {
"start": 212,
"end": 217,
"ctxt": 0
},
"value": "value",
"raw": "value"
},
{
"type": "Delimiter",
"span": {
"start": 218,
"end": 219,
"ctxt": 0
},
"value": ","
},
{
"type": "Identifier",
"span": {
"start": 220,
"end": 225,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 231,
"end": 245,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 231,
"end": 235,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "Percent",
"span": {
"start": 237,
"end": 241,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 237,
"end": 240,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
}
},
{
"type": "Percent",
"span": {
"start": 241,
"end": 245,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 241,
"end": 244,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 251,
"end": 273,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 251,
"end": 255,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "String",
"span": {
"start": 257,
"end": 265,
"ctxt": 0
},
"value": "string",
"raw": "\"string\""
},
{
"type": "String",
"span": {
"start": 265,
"end": 273,
"ctxt": 0
},
"value": "string",
"raw": "\"string\""
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 279,
"end": 293,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 279,
"end": 283,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "HexColor",
"span": {
"start": 285,
"end": 289,
"ctxt": 0
},
"value": "ccc",
"raw": "ccc"
},
{
"type": "HexColor",
"span": {
"start": 289,
"end": 293,
"ctxt": 0
},
"value": "ccc",
"raw": "ccc"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 299,
"end": 325,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 299,
"end": 303,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "Url",
"span": {
"start": 305,
"end": 315,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 305,
"end": 308,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"value": {
"type": "UrlValueRaw",
"span": {
"start": 309,
"end": 314,
"ctxt": 0
},
"before": "",
"after": "",
"value": "value",
"raw": "value"
},
"modifiers": null
},
{
"type": "Url",
"span": {
"start": 315,
"end": 325,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 315,
"end": 318,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"value": {
"type": "UrlValueRaw",
"span": {
"start": 319,
"end": 324,
"ctxt": 0
},
"before": "",
"after": "",
"value": "value",
"raw": "value"
},
"modifiers": null
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 331,
"end": 351,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 331,
"end": 335,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 337,
"end": 344,
"ctxt": 0
},
"name": "(",
"value": [
{
"type": "Identifier",
"span": {
"start": 338,
"end": 343,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
]
},
{
"type": "SimpleBlock",
"span": {
"start": 344,
"end": 351,
"ctxt": 0
},
"name": "(",
"value": [
{
"type": "Identifier",
"span": {
"start": 345,
"end": 350,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 357,
"end": 377,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 357,
"end": 361,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 363,
"end": 370,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Tokens",
"span": {
"start": 364,
"end": 369,
"ctxt": 0
},
"tokens": [
{
"span": {
"start": 364,
"end": 369,
"ctxt": 0
},
"token": {
"Ident": {
"value": "value",
"raw": "value"
}
}
}
]
}
]
},
{
"type": "SimpleBlock",
"span": {
"start": 370,
"end": 377,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Tokens",
"span": {
"start": 371,
"end": 376,
"ctxt": 0
},
"tokens": [
{
"span": {
"start": 371,
"end": 376,
"ctxt": 0
},
"token": {
"Ident": {
"value": "value",
"raw": "value"
}
}
}
]
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 383,
"end": 403,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 383,
"end": 387,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 389,
"end": 396,
"ctxt": 0
},
"name": "[",
"value": [
{
"type": "Identifier",
"span": {
"start": 390,
"end": 395,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
]
},
{
"type": "SimpleBlock",
"span": {
"start": 396,
"end": 403,
"ctxt": 0
},
"name": "[",
"value": [
{
"type": "Identifier",
"span": {
"start": 397,
"end": 402,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 409,
"end": 425,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 409,
"end": 413,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "Identifier",
"span": {
"start": 415,
"end": 421,
"ctxt": 0
},
"value": "center",
"raw": "center"
},
{
"type": "Delimiter",
"span": {
"start": 421,
"end": 422,
"ctxt": 0
},
"value": "/"
},
{
"type": "Dimension",
"span": {
"start": 422,
"end": 425,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 422,
"end": 423,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"unit": {
"type": "Identifier",
"span": {
"start": 423,
"end": 425,
"ctxt": 0
},
"value": "em",
"raw": "em"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 431,
"end": 448,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 431,
"end": 435,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "Identifier",
"span": {
"start": 437,
"end": 443,
"ctxt": 0
},
"value": "center",
"raw": "center"
},
{
"type": "Delimiter",
"span": {
"start": 443,
"end": 444,
"ctxt": 0
},
"value": "/"
},
{
"type": "Dimension",
"span": {
"start": 445,
"end": 448,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 445,
"end": 446,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"unit": {
"type": "Identifier",
"span": {
"start": 446,
"end": 448,
"ctxt": 0
},
"value": "em",
"raw": "em"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 454,
"end": 471,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 454,
"end": 458,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "Identifier",
"span": {
"start": 460,
"end": 466,
"ctxt": 0
},
"value": "center",
"raw": "center"
},
{
"type": "Delimiter",
"span": {
"start": 467,
"end": 468,
"ctxt": 0
},
"value": "/"
},
{
"type": "Dimension",
"span": {
"start": 468,
"end": 471,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 468,
"end": 469,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"unit": {
"type": "Identifier",
"span": {
"start": 469,
"end": 471,
"ctxt": 0
},
"value": "em",
"raw": "em"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 477,
"end": 495,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 477,
"end": 481,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "Identifier",
"span": {
"start": 483,
"end": 489,
"ctxt": 0
},
"value": "center",
"raw": "center"
},
{
"type": "Delimiter",
"span": {
"start": 490,
"end": 491,
"ctxt": 0
},
"value": "/"
},
{
"type": "Dimension",
"span": {
"start": 492,
"end": 495,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 492,
"end": 493,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"unit": {
"type": "Identifier",
"span": {
"start": 493,
"end": 495,
"ctxt": 0
},
"value": "em",
"raw": "em"
}
}
],
"important": null
}
]
}
}
]
}