swc/css/parser/tests/fixture/stylis/comma/01/output.json
강동윤 c05a724d84
feat(css): Port stylis (#2131)
swc_css_ast:
 - Add `Value::Comma`.

swc_css_parser:
 - Implement more `Parse<T>`.
 - Fix parsing of values separated with comma.

swc_css_codegen:
 - Fix escaping.
 - Fix codegen of `!important`.

swc_stylis:
 - Port prefixer.
2021-08-23 12:42:13 +00:00

172 lines
4.5 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 55,
"ctxt": 0
},
"rules": [
{
"type": "StyleRule",
"span": {
"start": 0,
"end": 54,
"ctxt": 0
},
"selectors": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"selectors": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"hasNestPrefix": false,
"combinator": null,
"typeSelector": {
"type": "NamespacedName",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"value": "a"
}
},
"subclassSelectors": []
}
]
}
],
"block": {
"type": "DeclBlock",
"span": {
"start": 2,
"end": 54,
"ctxt": 0
},
"properties": [
{
"type": "Property",
"span": {
"start": 8,
"end": 51,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 8,
"end": 14,
"ctxt": 0
},
"value": "cursor"
},
"values": [
{
"type": "CommaValues",
"span": {
"start": 15,
"end": 51,
"ctxt": 0
},
"values": [
{
"type": "FnValue",
"span": {
"start": 16,
"end": 42,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 16,
"end": 25,
"ctxt": 0
},
"value": "image-set"
},
"args": [
{
"type": "SpaceValues",
"span": {
"start": 26,
"end": 41,
"ctxt": 0
},
"values": [
{
"type": "UrlValue",
"span": {
"start": 26,
"end": 38,
"ctxt": 0
},
"url": "foo.jpg"
},
{
"type": "UnitValue",
"span": {
"start": 39,
"end": 41,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 39,
"end": 40,
"ctxt": 0
},
"value": 2.0
},
"unit": {
"span": {
"start": 40,
"end": 41,
"ctxt": 0
},
"kind": "x"
}
}
]
}
]
},
{
"type": "Text",
"span": {
"start": 44,
"end": 51,
"ctxt": 0
},
"value": "pointer"
}
]
}
],
"important": null
}
]
}
}
]
}