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

900 lines
24 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 1,
"end": 435,
"ctxt": 0
},
"rules": [
{
"type": "AtRule",
"span": {
"start": 1,
"end": 45,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 2,
"end": 7,
"ctxt": 0
},
"value": "media",
"raw": "media"
},
"prelude": {
"type": "MediaQueryList",
"span": {
"start": 8,
"end": 42,
"ctxt": 0
},
"queries": [
{
"type": "MediaQuery",
"span": {
"start": 8,
"end": 42,
"ctxt": 0
},
"modifier": null,
"mediaType": {
"type": "Ident",
"span": {
"start": 8,
"end": 13,
"ctxt": 0
},
"value": "print",
"raw": "print"
},
"keyword": {
"type": "Ident",
"span": {
"start": 14,
"end": 17,
"ctxt": 0
},
"value": "and",
"raw": "and"
},
"condition": {
"type": "MediaConditionWithoutOr",
"span": {
"start": 18,
"end": 42,
"ctxt": 0
},
"conditions": [
{
"type": "MediaFeaturePlain",
"span": {
"start": 18,
"end": 42,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 19,
"end": 33,
"ctxt": 0
},
"value": "min-resolution",
"raw": "min-resolution"
},
"value": {
"type": "Resolution",
"span": {
"start": 35,
"end": 41,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 35,
"end": 38,
"ctxt": 0
},
"value": 300.0,
"raw": "300"
},
"unit": {
"type": "Ident",
"span": {
"start": 38,
"end": 41,
"ctxt": 0
},
"value": "dpi",
"raw": "dpi"
}
}
}
]
}
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 43,
"end": 45,
"ctxt": 0
},
"name": "{",
"value": []
}
},
{
"type": "AtRule",
"span": {
"start": 46,
"end": 91,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 47,
"end": 52,
"ctxt": 0
},
"value": "media",
"raw": "media"
},
"prelude": {
"type": "MediaQueryList",
"span": {
"start": 53,
"end": 88,
"ctxt": 0
},
"queries": [
{
"type": "MediaQuery",
"span": {
"start": 53,
"end": 88,
"ctxt": 0
},
"modifier": null,
"mediaType": {
"type": "Ident",
"span": {
"start": 53,
"end": 58,
"ctxt": 0
},
"value": "print",
"raw": "print"
},
"keyword": {
"type": "Ident",
"span": {
"start": 59,
"end": 62,
"ctxt": 0
},
"value": "and",
"raw": "and"
},
"condition": {
"type": "MediaConditionWithoutOr",
"span": {
"start": 63,
"end": 88,
"ctxt": 0
},
"conditions": [
{
"type": "MediaFeaturePlain",
"span": {
"start": 63,
"end": 88,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 64,
"end": 78,
"ctxt": 0
},
"value": "min-resolution",
"raw": "min-resolution"
},
"value": {
"type": "Resolution",
"span": {
"start": 80,
"end": 87,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 80,
"end": 83,
"ctxt": 0
},
"value": 300.0,
"raw": "300"
},
"unit": {
"type": "Ident",
"span": {
"start": 83,
"end": 87,
"ctxt": 0
},
"value": "dpcm",
"raw": "dpcm"
}
}
}
]
}
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 89,
"end": 91,
"ctxt": 0
},
"name": "{",
"value": []
}
},
{
"type": "AtRule",
"span": {
"start": 92,
"end": 137,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 93,
"end": 98,
"ctxt": 0
},
"value": "media",
"raw": "media"
},
"prelude": {
"type": "MediaQueryList",
"span": {
"start": 99,
"end": 134,
"ctxt": 0
},
"queries": [
{
"type": "MediaQuery",
"span": {
"start": 99,
"end": 134,
"ctxt": 0
},
"modifier": null,
"mediaType": {
"type": "Ident",
"span": {
"start": 99,
"end": 104,
"ctxt": 0
},
"value": "print",
"raw": "print"
},
"keyword": {
"type": "Ident",
"span": {
"start": 105,
"end": 108,
"ctxt": 0
},
"value": "and",
"raw": "and"
},
"condition": {
"type": "MediaConditionWithoutOr",
"span": {
"start": 109,
"end": 134,
"ctxt": 0
},
"conditions": [
{
"type": "MediaFeaturePlain",
"span": {
"start": 109,
"end": 134,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 110,
"end": 124,
"ctxt": 0
},
"value": "min-resolution",
"raw": "min-resolution"
},
"value": {
"type": "Resolution",
"span": {
"start": 126,
"end": 133,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 126,
"end": 129,
"ctxt": 0
},
"value": 300.0,
"raw": "300"
},
"unit": {
"type": "Ident",
"span": {
"start": 129,
"end": 133,
"ctxt": 0
},
"value": "dppx",
"raw": "dppx"
}
}
}
]
}
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 135,
"end": 137,
"ctxt": 0
},
"name": "{",
"value": []
}
},
{
"type": "AtRule",
"span": {
"start": 138,
"end": 180,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 139,
"end": 144,
"ctxt": 0
},
"value": "media",
"raw": "media"
},
"prelude": {
"type": "MediaQueryList",
"span": {
"start": 145,
"end": 177,
"ctxt": 0
},
"queries": [
{
"type": "MediaQuery",
"span": {
"start": 145,
"end": 177,
"ctxt": 0
},
"modifier": null,
"mediaType": {
"type": "Ident",
"span": {
"start": 145,
"end": 150,
"ctxt": 0
},
"value": "print",
"raw": "print"
},
"keyword": {
"type": "Ident",
"span": {
"start": 151,
"end": 154,
"ctxt": 0
},
"value": "and",
"raw": "and"
},
"condition": {
"type": "MediaConditionWithoutOr",
"span": {
"start": 155,
"end": 177,
"ctxt": 0
},
"conditions": [
{
"type": "MediaFeaturePlain",
"span": {
"start": 155,
"end": 177,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 156,
"end": 170,
"ctxt": 0
},
"value": "min-resolution",
"raw": "min-resolution"
},
"value": {
"type": "Resolution",
"span": {
"start": 172,
"end": 176,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 172,
"end": 175,
"ctxt": 0
},
"value": 300.0,
"raw": "300"
},
"unit": {
"type": "Ident",
"span": {
"start": 175,
"end": 176,
"ctxt": 0
},
"value": "x",
"raw": "x"
}
}
}
]
}
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 178,
"end": 180,
"ctxt": 0
},
"name": "{",
"value": []
}
},
{
"type": "QualifiedRule",
"span": {
"start": 182,
"end": 434,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 182,
"end": 186,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 182,
"end": 186,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 182,
"end": 186,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
"span": {
"start": 182,
"end": 186,
"ctxt": 0
},
"text": {
"type": "Ident",
"span": {
"start": 183,
"end": 186,
"ctxt": 0
},
"value": "box",
"raw": "box"
}
}
]
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 187,
"end": 434,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 193,
"end": 313,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 193,
"end": 209,
"ctxt": 0
},
"value": "background-image",
"raw": "background-image"
},
"value": [
{
"type": "Function",
"span": {
"start": 211,
"end": 313,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 211,
"end": 228,
"ctxt": 0
},
"value": "-webkit-image-set",
"raw": "-webkit-image-set"
},
"value": [
{
"type": "Url",
"span": {
"start": 242,
"end": 267,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 242,
"end": 245,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"value": {
"type": "String",
"span": {
"start": 246,
"end": 266,
"ctxt": 0
},
"value": "small-balloons.jpg",
"raw": "\"small-balloons.jpg\""
},
"modifiers": []
},
{
"type": "Resolution",
"span": {
"start": 268,
"end": 270,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 268,
"end": 269,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"unit": {
"type": "Ident",
"span": {
"start": 269,
"end": 270,
"ctxt": 0
},
"value": "x",
"raw": "x"
}
},
{
"type": "Delimiter",
"span": {
"start": 270,
"end": 271,
"ctxt": 0
},
"value": ","
},
{
"type": "Url",
"span": {
"start": 284,
"end": 309,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 284,
"end": 287,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"value": {
"type": "String",
"span": {
"start": 288,
"end": 308,
"ctxt": 0
},
"value": "large-balloons.jpg",
"raw": "\"large-balloons.jpg\""
},
"modifiers": []
},
{
"type": "Resolution",
"span": {
"start": 310,
"end": 312,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 310,
"end": 311,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
},
"unit": {
"type": "Ident",
"span": {
"start": 311,
"end": 312,
"ctxt": 0
},
"value": "x",
"raw": "x"
}
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 319,
"end": 431,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 319,
"end": 335,
"ctxt": 0
},
"value": "background-image",
"raw": "background-image"
},
"value": [
{
"type": "Function",
"span": {
"start": 337,
"end": 431,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 337,
"end": 346,
"ctxt": 0
},
"value": "image-set",
"raw": "image-set"
},
"value": [
{
"type": "Url",
"span": {
"start": 360,
"end": 385,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 360,
"end": 363,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"value": {
"type": "String",
"span": {
"start": 364,
"end": 384,
"ctxt": 0
},
"value": "small-balloons.jpg",
"raw": "\"small-balloons.jpg\""
},
"modifiers": []
},
{
"type": "Resolution",
"span": {
"start": 386,
"end": 388,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 386,
"end": 387,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"unit": {
"type": "Ident",
"span": {
"start": 387,
"end": 388,
"ctxt": 0
},
"value": "x",
"raw": "x"
}
},
{
"type": "Delimiter",
"span": {
"start": 388,
"end": 389,
"ctxt": 0
},
"value": ","
},
{
"type": "Url",
"span": {
"start": 402,
"end": 427,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 402,
"end": 405,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"value": {
"type": "String",
"span": {
"start": 406,
"end": 426,
"ctxt": 0
},
"value": "large-balloons.jpg",
"raw": "\"large-balloons.jpg\""
},
"modifiers": []
},
{
"type": "Resolution",
"span": {
"start": 428,
"end": 430,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 428,
"end": 429,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
},
"unit": {
"type": "Ident",
"span": {
"start": 429,
"end": 430,
"ctxt": 0
},
"value": "x",
"raw": "x"
}
}
]
}
],
"important": null
}
]
}
}
]
}