mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 22:07:34 +00:00
LibWeb: Make CSS/Properties.json "logical-aliases-for" an array
This allows us to specify all aliases properties instead of just one.
This commit is contained in:
parent
970a3ef4d8
commit
941092e3ad
2 changed files with 14 additions and 7 deletions
|
@ -56,9 +56,12 @@ ErrorOr<void> replace_logical_aliases(JsonObject& properties)
|
||||||
properties.for_each_member([&](auto& name, auto& value) {
|
properties.for_each_member([&](auto& name, auto& value) {
|
||||||
VERIFY(value.is_object());
|
VERIFY(value.is_object());
|
||||||
const auto& value_as_object = value.as_object();
|
const auto& value_as_object = value.as_object();
|
||||||
const auto logical_alias_for = value_as_object.get_deprecated_string("logical-alias-for"sv);
|
const auto logical_alias_for = value_as_object.get_array("logical-alias-for"sv);
|
||||||
if (logical_alias_for.has_value()) {
|
if (logical_alias_for.has_value()) {
|
||||||
logical_aliases.set(name, logical_alias_for.value());
|
auto const& aliased_properties = logical_alias_for.value();
|
||||||
|
for (auto const& aliased_property : aliased_properties.values()) {
|
||||||
|
logical_aliases.set(name, aliased_property.to_deprecated_string());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1336,8 +1336,10 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"max-inline-size": {
|
"max-inline-size": {
|
||||||
"logical-alias-for": "max-width",
|
"logical-alias-for": [
|
||||||
"__comment": "Also a logical alias for max-height",
|
"max-width",
|
||||||
|
"max-height"
|
||||||
|
],
|
||||||
"initial": "none"
|
"initial": "none"
|
||||||
},
|
},
|
||||||
"max-width": {
|
"max-width": {
|
||||||
|
@ -1373,8 +1375,10 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"min-inline-size": {
|
"min-inline-size": {
|
||||||
"logical-alias-for": "min-width",
|
"logical-alias-for": [
|
||||||
"__comment": "Also a logical alias for min-height",
|
"min-width",
|
||||||
|
"min-height"
|
||||||
|
],
|
||||||
"initial": "0"
|
"initial": "0"
|
||||||
},
|
},
|
||||||
"min-width": {
|
"min-width": {
|
||||||
|
@ -1767,7 +1771,7 @@
|
||||||
"inherited": false,
|
"inherited": false,
|
||||||
"initial": "0s",
|
"initial": "0s",
|
||||||
"valid-types": [
|
"valid-types": [
|
||||||
"time"
|
"time"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"user-select": {
|
"user-select": {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue