mirror of
https://github.com/swc-project/swc.git
synced 2024-12-20 04:01:39 +03:00
c05a724d84
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.
172 lines
4.5 KiB
JSON
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
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|