swc/crates/swc_css_parser/tests/fixture/at-rule/keyframe/output.json

1702 lines
44 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 1,
"end": 785,
"ctxt": 0
},
"rules": [
{
"type": "AtRule",
"span": {
"start": 1,
"end": 29,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 2,
"end": 11,
"ctxt": 0
},
"value": "keyframes",
"raw": "keyframes"
},
"prelude": {
"type": "CustomIdent",
"span": {
"start": 12,
"end": 15,
"ctxt": 0
},
"value": "foo",
"raw": "foo"
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 16,
"end": 29,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 16,
"end": 17,
"ctxt": 0
},
"token": "LBrace"
},
"value": []
}
},
{
"type": "AtRule",
"span": {
"start": 30,
"end": 60,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 31,
"end": 40,
"ctxt": 0
},
"value": "keyframes",
"raw": "keyframes"
},
"prelude": {
"type": "String",
"span": {
"start": 41,
"end": 46,
"ctxt": 0
},
"value": "foo",
"raw": "\"foo\""
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 47,
"end": 60,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 47,
"end": 48,
"ctxt": 0
},
"token": "LBrace"
},
"value": []
}
},
{
"type": "AtRule",
"span": {
"start": 61,
"end": 95,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 62,
"end": 71,
"ctxt": 0
},
"value": "keyframes",
"raw": "keyframes"
},
"prelude": {
"type": "CustomIdent",
"span": {
"start": 75,
"end": 78,
"ctxt": 0
},
"value": "foo",
"raw": "foo"
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 82,
"end": 95,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 82,
"end": 83,
"ctxt": 0
},
"token": "LBrace"
},
"value": []
}
},
{
"type": "AtRule",
"span": {
"start": 97,
"end": 224,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 98,
"end": 107,
"ctxt": 0
},
"value": "keyframes",
"raw": "keyframes"
},
"prelude": {
"type": "CustomIdent",
"span": {
"start": 108,
"end": 115,
"ctxt": 0
},
"value": "slidein",
"raw": "slidein"
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 116,
"end": 224,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 116,
"end": 117,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "KeyframeBlock",
"span": {
"start": 122,
"end": 169,
"ctxt": 0
},
"prelude": [
{
"type": "Ident",
"span": {
"start": 122,
"end": 126,
"ctxt": 0
},
"value": "from",
"raw": "from"
}
],
"block": {
"type": "SimpleBlock",
"span": {
"start": 127,
"end": 169,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 127,
"end": 128,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 137,
"end": 162,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 137,
"end": 146,
"ctxt": 0
},
"value": "transform",
"raw": "transform"
},
"value": [
{
"type": "Function",
"span": {
"start": 148,
"end": 162,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 148,
"end": 158,
"ctxt": 0
},
"value": "translatex",
"raw": "translateX"
},
"value": [
{
"type": "Percentage",
"span": {
"start": 159,
"end": 161,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 159,
"end": 160,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
}
],
"important": null
}
]
}
},
{
"type": "KeyframeBlock",
"span": {
"start": 175,
"end": 222,
"ctxt": 0
},
"prelude": [
{
"type": "Ident",
"span": {
"start": 175,
"end": 177,
"ctxt": 0
},
"value": "to",
"raw": "to"
}
],
"block": {
"type": "SimpleBlock",
"span": {
"start": 178,
"end": 222,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 178,
"end": 179,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 188,
"end": 215,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 188,
"end": 197,
"ctxt": 0
},
"value": "transform",
"raw": "transform"
},
"value": [
{
"type": "Function",
"span": {
"start": 199,
"end": 215,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 199,
"end": 209,
"ctxt": 0
},
"value": "translatex",
"raw": "translateX"
},
"value": [
{
"type": "Percentage",
"span": {
"start": 210,
"end": 214,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 210,
"end": 213,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
}
}
]
}
],
"important": null
}
]
}
}
]
}
},
{
"type": "AtRule",
"span": {
"start": 226,
"end": 368,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 227,
"end": 236,
"ctxt": 0
},
"value": "keyframes",
"raw": "keyframes"
},
"prelude": {
"type": "CustomIdent",
"span": {
"start": 237,
"end": 247,
"ctxt": 0
},
"value": "identifier",
"raw": "identifier"
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 248,
"end": 368,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 248,
"end": 249,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "KeyframeBlock",
"span": {
"start": 254,
"end": 277,
"ctxt": 0
},
"prelude": [
{
"type": "Percentage",
"span": {
"start": 254,
"end": 256,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 254,
"end": 255,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
],
"block": {
"type": "SimpleBlock",
"span": {
"start": 257,
"end": 277,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 257,
"end": 258,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 259,
"end": 265,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 259,
"end": 262,
"ctxt": 0
},
"value": "top",
"raw": "top"
},
"value": [
{
"type": "Integer",
"span": {
"start": 264,
"end": 265,
"ctxt": 0
},
"value": 0,
"raw": "0"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 267,
"end": 274,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 267,
"end": 271,
"ctxt": 0
},
"value": "left",
"raw": "left"
},
"value": [
{
"type": "Integer",
"span": {
"start": 273,
"end": 274,
"ctxt": 0
},
"value": 0,
"raw": "0"
}
],
"important": null
}
]
}
},
{
"type": "KeyframeBlock",
"span": {
"start": 282,
"end": 300,
"ctxt": 0
},
"prelude": [
{
"type": "Percentage",
"span": {
"start": 282,
"end": 285,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 282,
"end": 284,
"ctxt": 0
},
"value": 30.0,
"raw": "30"
}
}
],
"block": {
"type": "SimpleBlock",
"span": {
"start": 286,
"end": 300,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 286,
"end": 287,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 288,
"end": 297,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 288,
"end": 291,
"ctxt": 0
},
"value": "top",
"raw": "top"
},
"value": [
{
"type": "Length",
"span": {
"start": 293,
"end": 297,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 293,
"end": 295,
"ctxt": 0
},
"value": 50.0,
"raw": "50"
},
"unit": {
"type": "Ident",
"span": {
"start": 295,
"end": 297,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
],
"important": null
}
]
}
},
{
"type": "KeyframeBlock",
"span": {
"start": 305,
"end": 329,
"ctxt": 0
},
"prelude": [
{
"type": "Percentage",
"span": {
"start": 305,
"end": 308,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 305,
"end": 307,
"ctxt": 0
},
"value": 68.0,
"raw": "68"
}
},
{
"type": "Percentage",
"span": {
"start": 310,
"end": 313,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 310,
"end": 312,
"ctxt": 0
},
"value": 72.0,
"raw": "72"
}
}
],
"block": {
"type": "SimpleBlock",
"span": {
"start": 314,
"end": 329,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 314,
"end": 315,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 316,
"end": 326,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 316,
"end": 320,
"ctxt": 0
},
"value": "left",
"raw": "left"
},
"value": [
{
"type": "Length",
"span": {
"start": 322,
"end": 326,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 322,
"end": 324,
"ctxt": 0
},
"value": 50.0,
"raw": "50"
},
"unit": {
"type": "Ident",
"span": {
"start": 324,
"end": 326,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
],
"important": null
}
]
}
},
{
"type": "KeyframeBlock",
"span": {
"start": 334,
"end": 366,
"ctxt": 0
},
"prelude": [
{
"type": "Percentage",
"span": {
"start": 334,
"end": 338,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 334,
"end": 337,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
}
}
],
"block": {
"type": "SimpleBlock",
"span": {
"start": 339,
"end": 366,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 339,
"end": 340,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 341,
"end": 351,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 341,
"end": 344,
"ctxt": 0
},
"value": "top",
"raw": "top"
},
"value": [
{
"type": "Length",
"span": {
"start": 346,
"end": 351,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 346,
"end": 349,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
},
"unit": {
"type": "Ident",
"span": {
"start": 349,
"end": 351,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 353,
"end": 363,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 353,
"end": 357,
"ctxt": 0
},
"value": "left",
"raw": "left"
},
"value": [
{
"type": "Percentage",
"span": {
"start": 359,
"end": 363,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 359,
"end": 362,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
}
}
],
"important": null
}
]
}
}
]
}
},
{
"type": "AtRule",
"span": {
"start": 370,
"end": 387,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 371,
"end": 380,
"ctxt": 0
},
"value": "keyframes",
"raw": "keyframes"
},
"prelude": {
"type": "CustomIdent",
"span": {
"start": 381,
"end": 384,
"ctxt": 0
},
"value": "FOO",
"raw": "FOO"
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 385,
"end": 387,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 385,
"end": 386,
"ctxt": 0
},
"token": "LBrace"
},
"value": []
}
},
{
"type": "AtRule",
"span": {
"start": 388,
"end": 411,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 389,
"end": 398,
"ctxt": 0
},
"value": "keyframes",
"raw": "keyframes"
},
"prelude": {
"type": "String",
"span": {
"start": 399,
"end": 408,
"ctxt": 0
},
"value": "initial",
"raw": "\"initial\""
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 409,
"end": 411,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 409,
"end": 410,
"ctxt": 0
},
"token": "LBrace"
},
"value": []
}
},
{
"type": "AtRule",
"span": {
"start": 412,
"end": 432,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 413,
"end": 422,
"ctxt": 0
},
"value": "keyframes",
"raw": "keyframes"
},
"prelude": {
"type": "String",
"span": {
"start": 423,
"end": 429,
"ctxt": 0
},
"value": "None",
"raw": "\"None\""
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 430,
"end": 432,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 430,
"end": 431,
"ctxt": 0
},
"token": "LBrace"
},
"value": []
}
},
{
"type": "AtRule",
"span": {
"start": 433,
"end": 652,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 434,
"end": 443,
"ctxt": 0
},
"value": "keyframes",
"raw": "keyframes"
},
"prelude": {
"type": "CustomIdent",
"span": {
"start": 444,
"end": 455,
"ctxt": 0
},
"value": "slide-right",
"raw": "slide-right"
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 456,
"end": 652,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 456,
"end": 457,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "KeyframeBlock",
"span": {
"start": 463,
"end": 501,
"ctxt": 0
},
"prelude": [
{
"type": "Ident",
"span": {
"start": 463,
"end": 467,
"ctxt": 0
},
"value": "from",
"raw": "from"
}
],
"block": {
"type": "SimpleBlock",
"span": {
"start": 468,
"end": 501,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 468,
"end": 469,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 478,
"end": 494,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 478,
"end": 489,
"ctxt": 0
},
"value": "margin-left",
"raw": "margin-left"
},
"value": [
{
"type": "Length",
"span": {
"start": 491,
"end": 494,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 491,
"end": 492,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
},
"unit": {
"type": "Ident",
"span": {
"start": 492,
"end": 494,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
],
"important": null
}
]
}
},
{
"type": "KeyframeBlock",
"span": {
"start": 507,
"end": 566,
"ctxt": 0
},
"prelude": [
{
"type": "Percentage",
"span": {
"start": 507,
"end": 510,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 507,
"end": 509,
"ctxt": 0
},
"value": 50.0,
"raw": "50"
}
}
],
"block": {
"type": "SimpleBlock",
"span": {
"start": 511,
"end": 566,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 511,
"end": 512,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 521,
"end": 539,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 521,
"end": 532,
"ctxt": 0
},
"value": "margin-left",
"raw": "margin-left"
},
"value": [
{
"type": "Length",
"span": {
"start": 534,
"end": 539,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 534,
"end": 537,
"ctxt": 0
},
"value": 110.0,
"raw": "110"
},
"unit": {
"type": "Ident",
"span": {
"start": 537,
"end": 539,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 549,
"end": 559,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 549,
"end": 556,
"ctxt": 0
},
"value": "opacity",
"raw": "opacity"
},
"value": [
{
"type": "Integer",
"span": {
"start": 558,
"end": 559,
"ctxt": 0
},
"value": 1,
"raw": "1"
}
],
"important": null
}
]
}
},
{
"type": "KeyframeBlock",
"span": {
"start": 572,
"end": 605,
"ctxt": 0
},
"prelude": [
{
"type": "Percentage",
"span": {
"start": 572,
"end": 575,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 572,
"end": 574,
"ctxt": 0
},
"value": 50.0,
"raw": "50"
}
}
],
"block": {
"type": "SimpleBlock",
"span": {
"start": 576,
"end": 605,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 576,
"end": 577,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 586,
"end": 598,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 586,
"end": 593,
"ctxt": 0
},
"value": "opacity",
"raw": "opacity"
},
"value": [
{
"type": "Number",
"span": {
"start": 595,
"end": 598,
"ctxt": 0
},
"value": 0.9,
"raw": "0.9"
}
],
"important": null
}
]
}
},
{
"type": "KeyframeBlock",
"span": {
"start": 611,
"end": 649,
"ctxt": 0
},
"prelude": [
{
"type": "Ident",
"span": {
"start": 611,
"end": 613,
"ctxt": 0
},
"value": "to",
"raw": "to"
}
],
"block": {
"type": "SimpleBlock",
"span": {
"start": 614,
"end": 649,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 614,
"end": 615,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 624,
"end": 642,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 624,
"end": 635,
"ctxt": 0
},
"value": "margin-left",
"raw": "margin-left"
},
"value": [
{
"type": "Length",
"span": {
"start": 637,
"end": 642,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 637,
"end": 640,
"ctxt": 0
},
"value": 200.0,
"raw": "200"
},
"unit": {
"type": "Ident",
"span": {
"start": 640,
"end": 642,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
],
"important": null
}
]
}
}
]
}
},
{
"type": "AtRule",
"span": {
"start": 654,
"end": 784,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 655,
"end": 664,
"ctxt": 0
},
"value": "keyframes",
"raw": "keyframes"
},
"prelude": {
"type": "CustomIdent",
"span": {
"start": 665,
"end": 675,
"ctxt": 0
},
"value": "slidein-up",
"raw": "slidein-up"
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 676,
"end": 784,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 676,
"end": 677,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "KeyframeBlock",
"span": {
"start": 682,
"end": 729,
"ctxt": 0
},
"prelude": [
{
"type": "Ident",
"span": {
"start": 682,
"end": 686,
"ctxt": 0
},
"value": "from",
"raw": "fRoM"
}
],
"block": {
"type": "SimpleBlock",
"span": {
"start": 687,
"end": 729,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 687,
"end": 688,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 697,
"end": 722,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 697,
"end": 706,
"ctxt": 0
},
"value": "transform",
"raw": "transform"
},
"value": [
{
"type": "Function",
"span": {
"start": 708,
"end": 722,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 708,
"end": 718,
"ctxt": 0
},
"value": "translatex",
"raw": "translateX"
},
"value": [
{
"type": "Percentage",
"span": {
"start": 719,
"end": 721,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 719,
"end": 720,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
}
],
"important": null
}
]
}
},
{
"type": "KeyframeBlock",
"span": {
"start": 735,
"end": 782,
"ctxt": 0
},
"prelude": [
{
"type": "Ident",
"span": {
"start": 735,
"end": 737,
"ctxt": 0
},
"value": "to",
"raw": "tO"
}
],
"block": {
"type": "SimpleBlock",
"span": {
"start": 738,
"end": 782,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 738,
"end": 739,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 748,
"end": 775,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 748,
"end": 757,
"ctxt": 0
},
"value": "transform",
"raw": "transform"
},
"value": [
{
"type": "Function",
"span": {
"start": 759,
"end": 775,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 759,
"end": 769,
"ctxt": 0
},
"value": "translatex",
"raw": "translateX"
},
"value": [
{
"type": "Percentage",
"span": {
"start": 770,
"end": 774,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 770,
"end": 773,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
}
}
]
}
],
"important": null
}
]
}
}
]
}
}
]
}