LibWeb/CSS: Mark grid-[gap, column-gap, row-gap] properties as aliases

These are legacy name aliases for the properties without the 'grid-'
prefix. See https://drafts.csswg.org/css-align-3/#gap-legacy
This commit is contained in:
Sam Atkins 2024-10-14 11:24:48 +01:00 committed by Andreas Kling
commit c79f261bec
Notes: github-actions[bot] 2024-10-14 15:58:28 +00:00
3 changed files with 5 additions and 51 deletions

View file

@ -113,15 +113,13 @@ grid-auto-columns: auto
grid-auto-flow: row grid-auto-flow: row
grid-auto-rows: auto grid-auto-rows: auto
grid-column-end: auto grid-column-end: auto
grid-column-gap: auto
grid-column-start: auto grid-column-start: auto
grid-row-end: auto grid-row-end: auto
grid-row-gap: auto
grid-row-start: auto grid-row-start: auto
grid-template-areas: grid-template-areas:
grid-template-columns: grid-template-columns:
grid-template-rows: grid-template-rows:
height: 2091px height: 2057px
inline-size: auto inline-size: auto
inset-block-end: auto inset-block-end: auto
inset-block-start: auto inset-block-start: auto

View file

@ -1382,17 +1382,7 @@
] ]
}, },
"grid-column-gap": { "grid-column-gap": {
"animation-type": "by-computed-value", "legacy-alias-for": "column-gap"
"inherited": false,
"initial": "auto",
"valid-types": [
"length [0,∞]",
"percentage [0,∞]"
],
"valid-identifiers": [
"auto"
],
"percentages-resolve-to": "length"
}, },
"grid-column-start": { "grid-column-start": {
"animation-type": "discrete", "animation-type": "discrete",
@ -1406,21 +1396,7 @@
] ]
}, },
"grid-gap": { "grid-gap": {
"inherited": false, "legacy-alias-for": "gap"
"initial": "auto",
"valid-types": [
"length [0,∞]",
"percentage [0,∞]"
],
"max-values": 2,
"valid-identifiers": [
"auto"
],
"percentages-resolve-to": "length",
"longhands": [
"grid-row-gap",
"grid-column-gap"
]
}, },
"grid-row": { "grid-row": {
"inherited": false, "inherited": false,
@ -1448,17 +1424,7 @@
] ]
}, },
"grid-row-gap": { "grid-row-gap": {
"animation-type": "by-computed-value", "legacy-alias-for": "row-gap"
"inherited": false,
"initial": "auto",
"valid-types": [
"length [0,∞]",
"percentage [0,∞]"
],
"valid-identifiers": [
"auto"
],
"percentages-resolve-to": "length"
}, },
"grid-row-start": { "grid-row-start": {
"animation-type": "discrete", "animation-type": "discrete",

View file

@ -726,7 +726,7 @@ void StyleComputer::for_each_property_expanding_shorthands(PropertyID property_i
return; return;
} }
if (property_id == CSS::PropertyID::Gap || property_id == CSS::PropertyID::GridGap) { if (property_id == CSS::PropertyID::Gap) {
if (value.is_value_list()) { if (value.is_value_list()) {
auto const& values_list = value.as_value_list(); auto const& values_list = value.as_value_list();
set_longhand_property(CSS::PropertyID::RowGap, values_list.values()[0]); set_longhand_property(CSS::PropertyID::RowGap, values_list.values()[0]);
@ -738,16 +738,6 @@ void StyleComputer::for_each_property_expanding_shorthands(PropertyID property_i
return; return;
} }
if (property_id == CSS::PropertyID::RowGap || property_id == CSS::PropertyID::GridRowGap) {
set_longhand_property(CSS::PropertyID::RowGap, value);
return;
}
if (property_id == CSS::PropertyID::ColumnGap || property_id == CSS::PropertyID::GridColumnGap) {
set_longhand_property(CSS::PropertyID::ColumnGap, value);
return;
}
if (property_id == CSS::PropertyID::MaxInlineSize || property_id == CSS::PropertyID::MinInlineSize) { if (property_id == CSS::PropertyID::MaxInlineSize || property_id == CSS::PropertyID::MinInlineSize) {
// FIXME: Use writing-mode to determine if we should set width or height. // FIXME: Use writing-mode to determine if we should set width or height.
bool is_horizontal = true; bool is_horizontal = true;