swc/crates/swc_css_parser/tests/fixture/rome/at-page/output.json

548 lines
12 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 263,
"ctxt": 0
},
"rules": [
{
"type": "PageRule",
"span": {
"start": 0,
"end": 72,
"ctxt": 0
},
"prelude": {
"type": "PageSelectorList",
"span": {
"start": 6,
"end": 18,
"ctxt": 0
},
"selectors": [
{
"type": "PageSelector",
"span": {
"start": 6,
"end": 18,
"ctxt": 0
},
"pageType": {
"type": "PageSelectorType",
"span": {
"start": 6,
"end": 12,
"ctxt": 0
},
"value": {
"type": "Ident",
"span": {
"start": 6,
"end": 12,
"ctxt": 0
},
"value": "MyPage",
"raw": "MyPage"
}
},
"pseudos": [
{
"type": "PageSelectorPseudo",
"span": {
"start": 12,
"end": 18,
"ctxt": 0
},
"value": {
"type": "Ident",
"span": {
"start": 13,
"end": 18,
"ctxt": 0
},
"value": "blank",
"raw": "blank"
}
}
]
}
]
},
"block": [
{
"type": "PageMarginRule",
"span": {
"start": 22,
"end": 51,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 23,
"end": 33,
"ctxt": 0
},
"value": "top-center",
"raw": "top-center"
},
"block": [
{
"type": "Declaration",
"span": {
"start": 36,
"end": 49,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 36,
"end": 43,
"ctxt": 0
},
"value": "content",
"raw": "content"
},
"value": [
{
"type": "Ident",
"span": {
"start": 45,
"end": 49,
"ctxt": 0
},
"value": "none",
"raw": "none"
}
],
"important": null
}
]
},
{
"type": "Declaration",
"span": {
"start": 53,
"end": 69,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 53,
"end": 64,
"ctxt": 0
},
"value": "margin-left",
"raw": "margin-left"
},
"value": [
{
"type": "Length",
"span": {
"start": 66,
"end": 69,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 66,
"end": 67,
"ctxt": 0
},
"value": 4.0,
"raw": "4"
},
"unit": {
"type": "Ident",
"span": {
"start": 67,
"end": 69,
"ctxt": 0
},
"value": "cm",
"raw": "cm"
}
}
],
"important": null
}
]
},
{
"type": "PageRule",
"span": {
"start": 74,
"end": 140,
"ctxt": 0
},
"prelude": {
"type": "PageSelectorList",
"span": {
"start": 80,
"end": 86,
"ctxt": 0
},
"selectors": [
{
"type": "PageSelector",
"span": {
"start": 80,
"end": 86,
"ctxt": 0
},
"pageType": null,
"pseudos": [
{
"type": "PageSelectorPseudo",
"span": {
"start": 80,
"end": 86,
"ctxt": 0
},
"value": {
"type": "Ident",
"span": {
"start": 81,
"end": 86,
"ctxt": 0
},
"value": "blank",
"raw": "blank"
}
}
]
}
]
},
"block": [
{
"type": "PageMarginRule",
"span": {
"start": 90,
"end": 119,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 91,
"end": 101,
"ctxt": 0
},
"value": "top-center",
"raw": "top-center"
},
"block": [
{
"type": "Declaration",
"span": {
"start": 104,
"end": 117,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 104,
"end": 111,
"ctxt": 0
},
"value": "content",
"raw": "content"
},
"value": [
{
"type": "Ident",
"span": {
"start": 113,
"end": 117,
"ctxt": 0
},
"value": "none",
"raw": "none"
}
],
"important": null
}
]
},
{
"type": "Declaration",
"span": {
"start": 121,
"end": 137,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 121,
"end": 132,
"ctxt": 0
},
"value": "margin-left",
"raw": "margin-left"
},
"value": [
{
"type": "Length",
"span": {
"start": 134,
"end": 137,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 134,
"end": 135,
"ctxt": 0
},
"value": 4.0,
"raw": "4"
},
"unit": {
"type": "Ident",
"span": {
"start": 135,
"end": 137,
"ctxt": 0
},
"value": "cm",
"raw": "cm"
}
}
],
"important": null
}
]
},
{
"type": "PageRule",
"span": {
"start": 142,
"end": 201,
"ctxt": 0
},
"prelude": null,
"block": [
{
"type": "PageMarginRule",
"span": {
"start": 151,
"end": 180,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 152,
"end": 162,
"ctxt": 0
},
"value": "top-center",
"raw": "top-center"
},
"block": [
{
"type": "Declaration",
"span": {
"start": 165,
"end": 178,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 165,
"end": 172,
"ctxt": 0
},
"value": "content",
"raw": "content"
},
"value": [
{
"type": "Ident",
"span": {
"start": 174,
"end": 178,
"ctxt": 0
},
"value": "none",
"raw": "none"
}
],
"important": null
}
]
},
{
"type": "Declaration",
"span": {
"start": 182,
"end": 198,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 182,
"end": 193,
"ctxt": 0
},
"value": "margin-left",
"raw": "margin-left"
},
"value": [
{
"type": "Length",
"span": {
"start": 195,
"end": 198,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 195,
"end": 196,
"ctxt": 0
},
"value": 4.0,
"raw": "4"
},
"unit": {
"type": "Ident",
"span": {
"start": 196,
"end": 198,
"ctxt": 0
},
"value": "cm",
"raw": "cm"
}
}
],
"important": null
}
]
},
{
"type": "PageRule",
"span": {
"start": 203,
"end": 262,
"ctxt": 0
},
"prelude": null,
"block": [
{
"type": "PageMarginRule",
"span": {
"start": 212,
"end": 241,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 213,
"end": 223,
"ctxt": 0
},
"value": "top-center",
"raw": "top-center"
},
"block": [
{
"type": "Declaration",
"span": {
"start": 226,
"end": 239,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 226,
"end": 233,
"ctxt": 0
},
"value": "CONTENT",
"raw": "CONTENT"
},
"value": [
{
"type": "Ident",
"span": {
"start": 235,
"end": 239,
"ctxt": 0
},
"value": "none",
"raw": "none"
}
],
"important": null
}
]
},
{
"type": "Declaration",
"span": {
"start": 243,
"end": 259,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 243,
"end": 254,
"ctxt": 0
},
"value": "MARGIN-LEFT",
"raw": "MARGIN-LEFT"
},
"value": [
{
"type": "Length",
"span": {
"start": 256,
"end": 259,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 256,
"end": 257,
"ctxt": 0
},
"value": 4.0,
"raw": "4"
},
"unit": {
"type": "Ident",
"span": {
"start": 257,
"end": 259,
"ctxt": 0
},
"value": "cm",
"raw": "cm"
}
}
],
"important": null
}
]
}
]
}