mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:07:45 +00:00
LibWeb: Add logical CSS properties for insets
This patch adds the following properties: - inset-inline - inset-inline-start - inset-inline-end - inset-block - inset-block-start - inset-block-end
This commit is contained in:
parent
fc065ee560
commit
1470e60800
4 changed files with 95 additions and 0 deletions
|
@ -1205,6 +1205,54 @@
|
|||
],
|
||||
"percentages-resolve-to": "length"
|
||||
},
|
||||
"inset-block": {
|
||||
"logical-alias-for": [
|
||||
"inset"
|
||||
],
|
||||
"max-values": 2
|
||||
},
|
||||
"inset-block-end": {
|
||||
"logical-alias-for": [
|
||||
"top",
|
||||
"right",
|
||||
"bottom",
|
||||
"left"
|
||||
],
|
||||
"max-values": 1
|
||||
},
|
||||
"inset-block-start": {
|
||||
"logical-alias-for": [
|
||||
"top",
|
||||
"right",
|
||||
"bottom",
|
||||
"left"
|
||||
],
|
||||
"max-values": 1
|
||||
},
|
||||
"inset-inline": {
|
||||
"logical-alias-for": [
|
||||
"inset"
|
||||
],
|
||||
"max-values": 2
|
||||
},
|
||||
"inset-inline-end": {
|
||||
"logical-alias-for": [
|
||||
"top",
|
||||
"right",
|
||||
"bottom",
|
||||
"left"
|
||||
],
|
||||
"max-values": 1
|
||||
},
|
||||
"inset-inline-start": {
|
||||
"logical-alias-for": [
|
||||
"top",
|
||||
"right",
|
||||
"bottom",
|
||||
"left"
|
||||
],
|
||||
"max-values": 1
|
||||
},
|
||||
"justify-content": {
|
||||
"inherited": false,
|
||||
"initial": "flex-start",
|
||||
|
|
|
@ -304,6 +304,14 @@ static void set_property_expanding_shorthands(StyleProperties& style, CSS::Prope
|
|||
return PropertyID::PaddingLeft;
|
||||
case PropertyID::PaddingInlineEnd:
|
||||
return PropertyID::PaddingRight;
|
||||
case PropertyID::InsetBlockStart:
|
||||
return PropertyID::Top;
|
||||
case PropertyID::InsetBlockEnd:
|
||||
return PropertyID::Bottom;
|
||||
case PropertyID::InsetInlineStart:
|
||||
return PropertyID::Left;
|
||||
case PropertyID::InsetInlineEnd:
|
||||
return PropertyID::Right;
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
|
@ -324,6 +332,10 @@ static void set_property_expanding_shorthands(StyleProperties& style, CSS::Prope
|
|||
return StartAndEndPropertyIDs { PropertyID::PaddingTop, PropertyID::PaddingBottom };
|
||||
case PropertyID::PaddingInline:
|
||||
return StartAndEndPropertyIDs { PropertyID::PaddingLeft, PropertyID::PaddingRight };
|
||||
case PropertyID::InsetBlock:
|
||||
return StartAndEndPropertyIDs { PropertyID::Top, PropertyID::Bottom };
|
||||
case PropertyID::InsetInline:
|
||||
return StartAndEndPropertyIDs { PropertyID::Left, PropertyID::Right };
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue