mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
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:
parent
6114e69a53
commit
c79f261bec
Notes:
github-actions[bot]
2024-10-14 15:58:28 +00:00
Author: https://github.com/AtkinsSJ
Commit: c79f261bec
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1785
3 changed files with 5 additions and 51 deletions
|
@ -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
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue