swc/crates/swc_css_parser/tests/fixture/value/url/output.json

1449 lines
39 KiB
JSON
Raw Normal View History

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 1335,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 0,
"end": 1334,
"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": "Ident",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"value": "div",
"raw": "div"
}
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 4,
"end": 1334,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 10,
"end": 56,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 10,
"end": 20,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 22,
"end": 56,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 22,
"end": 25,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"value": {
"type": "UrlValueRaw",
"span": {
"start": 26,
"end": 55,
"ctxt": 0
},
"before": "",
"after": "",
"value": "https://example.com/image.png",
"raw": "https://example.com/image.png"
},
"modifiers": null
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 62,
"end": 108,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 62,
"end": 72,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 74,
"end": 108,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 74,
"end": 77,
"ctxt": 0
},
"value": "URL",
"raw": "URL"
},
"value": {
"type": "UrlValueRaw",
"span": {
"start": 78,
"end": 107,
"ctxt": 0
},
"before": "",
"after": "",
"value": "https://example.com/image.png",
"raw": "https://example.com/image.png"
},
"modifiers": null
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 114,
"end": 161,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 114,
"end": 124,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 126,
"end": 161,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 126,
"end": 130,
"ctxt": 0
},
"value": "URL",
"raw": "\\URL"
},
"value": {
"type": "UrlValueRaw",
"span": {
"start": 131,
"end": 160,
"ctxt": 0
},
"before": "",
"after": "",
"value": "https://example.com/image.png",
"raw": "https://example.com/image.png"
},
"modifiers": null
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 167,
"end": 215,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 167,
"end": 177,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 179,
"end": 215,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 179,
"end": 182,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"value": {
"type": "String",
"span": {
"start": 183,
"end": 214,
"ctxt": 0
},
"value": "https://example.com/image.png",
"raw": "\"https://example.com/image.png\""
},
"modifiers": []
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 221,
"end": 269,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 221,
"end": 231,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 233,
"end": 269,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 233,
"end": 236,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"value": {
"type": "String",
"span": {
"start": 237,
"end": 268,
"ctxt": 0
},
"value": "https://example.com/image.png",
"raw": "'https://example.com/image.png'"
},
"modifiers": []
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 275,
"end": 323,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 275,
"end": 285,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 287,
"end": 323,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 287,
"end": 290,
"ctxt": 0
},
"value": "URL",
"raw": "URL"
},
"value": {
"type": "String",
"span": {
"start": 291,
"end": 322,
"ctxt": 0
},
"value": "https://example.com/image.png",
"raw": "'https://example.com/image.png'"
},
"modifiers": []
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 329,
"end": 378,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 329,
"end": 339,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 341,
"end": 378,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 341,
"end": 345,
"ctxt": 0
},
"value": "URL",
"raw": "\\URL"
},
"value": {
"type": "String",
"span": {
"start": 346,
"end": 377,
"ctxt": 0
},
"value": "https://example.com/image.png",
"raw": "'https://example.com/image.png'"
},
"modifiers": []
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 384,
"end": 429,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 384,
"end": 394,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 396,
"end": 429,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 396,
"end": 399,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"value": {
"type": "UrlValueRaw",
"span": {
"start": 400,
"end": 428,
"ctxt": 0
},
"before": "",
"after": "",
"value": "data:image/png;base64,iRxVB0",
"raw": "data:image/png;base64,iRxVB0"
},
"modifiers": null
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 435,
"end": 464,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 435,
"end": 445,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 447,
"end": 464,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 447,
"end": 450,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"value": {
"type": "UrlValueRaw",
"span": {
"start": 451,
"end": 463,
"ctxt": 0
},
"before": "",
"after": "",
"value": "#IDofSVGpath",
"raw": "#IDofSVGpath"
},
"modifiers": null
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 545,
"end": 589,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 545,
"end": 555,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 557,
"end": 589,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 557,
"end": 560,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"value": {
"type": "String",
"span": {
"start": 561,
"end": 579,
"ctxt": 0
},
"value": "//aa.com/img.svg",
"raw": "\"//aa.com/img.svg\""
},
"modifiers": [
{
"type": "Ident",
"span": {
"start": 580,
"end": 588,
"ctxt": 0
},
"value": "prefetch",
"raw": "prefetch"
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 595,
"end": 653,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 595,
"end": 605,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 607,
"end": 653,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 607,
"end": 610,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"value": {
"type": "String",
"span": {
"start": 611,
"end": 629,
"ctxt": 0
},
"value": "//aa.com/img.svg",
"raw": "\"//aa.com/img.svg\""
},
"modifiers": [
{
"type": "Ident",
"span": {
"start": 630,
"end": 633,
"ctxt": 0
},
"value": "foo",
"raw": "foo"
},
{
"type": "Ident",
"span": {
"start": 634,
"end": 637,
"ctxt": 0
},
"value": "bar",
"raw": "bar"
},
{
"type": "Ident",
"span": {
"start": 638,
"end": 641,
"ctxt": 0
},
"value": "baz",
"raw": "baz"
},
{
"type": "Function",
"span": {
"start": 642,
"end": 652,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 642,
"end": 646,
"ctxt": 0
},
"value": "func",
"raw": "func"
},
"value": [
{
"type": "Ident",
"span": {
"start": 647,
"end": 651,
"ctxt": 0
},
"value": "test",
"raw": "test"
}
]
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 659,
"end": 742,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 659,
"end": 669,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 671,
"end": 742,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 671,
"end": 674,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"value": {
"type": "String",
"span": {
"start": 675,
"end": 705,
"ctxt": 0
},
"value": "http://example.com/image.svg",
"raw": "\"http://example.com/image.svg\""
},
"modifiers": [
{
"type": "Function",
"span": {
"start": 706,
"end": 741,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 706,
"end": 711,
"ctxt": 0
},
"value": "param",
"raw": "param"
},
"value": [
{
"type": "DashedIdent",
"span": {
"start": 712,
"end": 719,
"ctxt": 0
},
"value": "--color",
"raw": "--color"
},
{
"type": "Function",
"span": {
"start": 720,
"end": 740,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 720,
"end": 723,
"ctxt": 0
},
"value": "var",
"raw": "var"
},
"value": [
{
"type": "DashedIdent",
"span": {
"start": 724,
"end": 739,
"ctxt": 0
},
"value": "--primary-color",
"raw": "--primary-color"
}
]
}
]
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 749,
"end": 766,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 749,
"end": 759,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 761,
"end": 766,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 761,
"end": 764,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"value": {
"type": "UrlValueRaw",
"span": {
"start": 765,
"end": 765,
"ctxt": 0
},
"before": "",
"after": "",
"value": "",
"raw": ""
},
"modifiers": null
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 772,
"end": 791,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 772,
"end": 782,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 784,
"end": 791,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 784,
"end": 787,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"value": {
"type": "String",
"span": {
"start": 788,
"end": 790,
"ctxt": 0
},
"value": "",
"raw": "\"\""
},
"modifiers": []
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 797,
"end": 816,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 797,
"end": 807,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 809,
"end": 816,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 809,
"end": 812,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"value": {
"type": "String",
"span": {
"start": 813,
"end": 815,
"ctxt": 0
},
"value": "",
"raw": "''"
},
"modifiers": []
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 823,
"end": 866,
"ctxt": 0
},
"name": {
"type": "DashedIdent",
"span": {
"start": 823,
"end": 828,
"ctxt": 0
},
"value": "--foo",
"raw": "--foo"
},
"value": [
{
"type": "PreservedToken",
"span": {
"start": 830,
"end": 866,
"ctxt": 0
},
"token": {
"Str": {
"value": "http://www.example.com/pinkish.gif",
"raw": "\"http://www.example.com/pinkish.gif\""
}
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 873,
"end": 926,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 873,
"end": 883,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 885,
"end": 926,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 885,
"end": 888,
"ctxt": 0
},
"value": "src",
"raw": "src"
},
"value": {
"type": "String",
"span": {
"start": 889,
"end": 925,
"ctxt": 0
},
"value": "http://www.example.com/pinkish.gif",
"raw": "\"http://www.example.com/pinkish.gif\""
},
"modifiers": []
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 932,
"end": 985,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 932,
"end": 942,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 944,
"end": 985,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 944,
"end": 947,
"ctxt": 0
},
"value": "SRC",
"raw": "SRC"
},
"value": {
"type": "String",
"span": {
"start": 948,
"end": 984,
"ctxt": 0
},
"value": "http://www.example.com/pinkish.gif",
"raw": "\"http://www.example.com/pinkish.gif\""
},
"modifiers": []
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 991,
"end": 1018,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 991,
"end": 1001,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 1003,
"end": 1018,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 1003,
"end": 1006,
"ctxt": 0
},
"value": "src",
"raw": "src"
},
"value": null,
"modifiers": [
{
"type": "Function",
"span": {
"start": 1007,
"end": 1017,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 1007,
"end": 1010,
"ctxt": 0
},
"value": "var",
"raw": "var"
},
"value": [
{
"type": "DashedIdent",
"span": {
"start": 1011,
"end": 1016,
"ctxt": 0
},
"value": "--foo",
"raw": "--foo"
}
]
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 1024,
"end": 1076,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 1024,
"end": 1034,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 1036,
"end": 1076,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 1036,
"end": 1039,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"value": {
"type": "UrlValueRaw",
"span": {
"start": 1040,
"end": 1075,
"ctxt": 0
},
"before": " ",
"after": " ",
"value": "https://example.com/image.png",
"raw": "https://example.com/image.png"
},
"modifiers": null
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 1082,
"end": 1135,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 1082,
"end": 1092,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 1094,
"end": 1135,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 1094,
"end": 1098,
"ctxt": 0
},
"value": "url",
"raw": "u\\rl"
},
"value": {
"type": "UrlValueRaw",
"span": {
"start": 1099,
"end": 1134,
"ctxt": 0
},
"before": " ",
"after": " ",
"value": "https://example.com/image.png",
"raw": "https://example.com/image.png"
},
"modifiers": null
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 1141,
"end": 1219,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 1141,
"end": 1151,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 1153,
"end": 1219,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 1153,
"end": 1156,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"value": {
"type": "UrlValueRaw",
"span": {
"start": 1157,
"end": 1218,
"ctxt": 0
},
"before": " \n ",
"after": " \n ",
"value": "https://example.com/image.png",
"raw": "https://example.com/image.png"
},
"modifiers": null
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 1225,
"end": 1277,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 1225,
"end": 1235,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 1237,
"end": 1277,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 1237,
"end": 1240,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"value": {
"type": "UrlValueRaw",
"span": {
"start": 1241,
"end": 1276,
"ctxt": 0
},
"before": "\n\n\n",
"after": "\n\n\n",
"value": "https://example.com/image.png",
"raw": "https://example.com/image.png"
},
"modifiers": null
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 1283,
"end": 1331,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 1283,
"end": 1293,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Url",
"span": {
"start": 1295,
"end": 1331,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 1295,
"end": 1298,
"ctxt": 0
},
"value": "URL",
"raw": "URL"
},
"value": {
"type": "UrlValueRaw",
"span": {
"start": 1299,
"end": 1330,
"ctxt": 0
},
"before": "",
"after": "",
"value": "https://example.com/ima)ge.png",
"raw": "https://example.com/ima\\)ge.png"
},
"modifiers": null
}
],
"important": null
}
]
}
}
]
}