ladybird/Libraries/LibWeb/CSS/LogicalPropertyGroups.json
Sam Atkins 69d4811ef7 LibWeb: Generate logical property mappings
To support this, how we declare logical property aliases has changed.
Instead of `logical-alias-for` being a list of properties, it's now an
object with a `group` and `mapping`. The group is the name of a logical
property group in LogicalPropertyGroups.json. The mapping is which
side/dimension/corner this property is. Hopefully it's self-explanatory
enough.

The generated code is very much a copy of what was previously in
`StyleComputer::map_logical_alias_to_physical_property_id()`, so there
should be no behaviour change.
2025-07-08 11:45:15 -06:00

56 lines
1.2 KiB
JSON

{
"border-color": {
"top": "border-top-color",
"right": "border-right-color",
"bottom": "border-bottom-color",
"left": "border-left-color"
},
"border-radius": {
"top-left": "border-top-left-radius",
"bottom-left": "border-bottom-left-radius",
"top-right": "border-top-right-radius",
"bottom-right": "border-bottom-right-radius"
},
"border-style": {
"top": "border-top-style",
"right": "border-right-style",
"bottom": "border-bottom-style",
"left": "border-left-style"
},
"border-width": {
"top": "border-top-width",
"right": "border-right-width",
"bottom": "border-bottom-width",
"left": "border-left-width"
},
"inset": {
"top": "top",
"right": "right",
"bottom": "bottom",
"left": "left"
},
"margin": {
"top": "margin-top",
"right": "margin-right",
"bottom": "margin-bottom",
"left": "margin-left"
},
"max-size": {
"width": "max-width",
"height": "max-height"
},
"min-size": {
"width": "min-width",
"height": "min-height"
},
"padding": {
"top": "padding-top",
"right": "padding-right",
"bottom": "padding-bottom",
"left": "padding-left"
},
"size": {
"width": "width",
"height": "height"
}
}