swc/css/parser/tests/fixture/rome/fit-content/output.json
Donny/강동윤 b206404d94
feat(css): Recover from invalid properties (#2312)
swc_css_ast:
 - Add `DeclBlockItem`.
 - Change `DeclBlock.properties` to `DeclBlock.items`.

swc_css_parser:
 - Add a way to recovered errors.
2021-09-28 09:58:56 +00:00

204 lines
5.1 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 74,
"ctxt": 0
},
"rules": [
{
"type": "StyleRule",
"span": {
"start": 0,
"end": 73,
"ctxt": 0
},
"selectors": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 6,
"ctxt": 0
},
"selectors": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 6,
"ctxt": 0
},
"hasNestPrefix": false,
"combinator": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
"span": {
"start": 0,
"end": 6,
"ctxt": 0
},
"text": {
"type": "Text",
"span": {
"start": 1,
"end": 6,
"ctxt": 0
},
"value": "style"
}
}
]
}
]
}
],
"block": {
"type": "DeclBlock",
"span": {
"start": 7,
"end": 73,
"ctxt": 0
},
"items": [
{
"type": "Property",
"span": {
"start": 10,
"end": 70,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 10,
"end": 31,
"ctxt": 0
},
"value": "grid-template-columns"
},
"values": [
{
"type": "FnValue",
"span": {
"start": 33,
"end": 49,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 33,
"end": 44,
"ctxt": 0
},
"value": "fit-content"
},
"args": [
{
"type": "UnitValue",
"span": {
"start": 45,
"end": 48,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 45,
"end": 46,
"ctxt": 0
},
"value": 8.0
},
"unit": {
"span": {
"start": 46,
"end": 48,
"ctxt": 0
},
"kind": "ch"
}
}
]
},
{
"type": "FnValue",
"span": {
"start": 50,
"end": 66,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 50,
"end": 61,
"ctxt": 0
},
"value": "fit-content"
},
"args": [
{
"type": "UnitValue",
"span": {
"start": 62,
"end": 65,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 62,
"end": 63,
"ctxt": 0
},
"value": 8.0
},
"unit": {
"span": {
"start": 63,
"end": 65,
"ctxt": 0
},
"kind": "ch"
}
}
]
},
{
"type": "UnitValue",
"span": {
"start": 67,
"end": 70,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 67,
"end": 68,
"ctxt": 0
},
"value": 1.0
},
"unit": {
"span": {
"start": 68,
"end": 70,
"ctxt": 0
},
"kind": "fr"
}
}
],
"important": null
}
]
}
}
]
}