mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
Stylo: Implement align-content and justify-content
This commit is contained in:
parent
1dbc538589
commit
c70167d17c
5 changed files with 316 additions and 16 deletions
|
@ -84,14 +84,20 @@ ${helpers.single_keyword("flex-wrap", "nowrap wrap wrap-reverse",
|
|||
spec="https://drafts.csswg.org/css-flexbox/#flex-wrap-property",
|
||||
extra_prefixes="webkit", animatable=False)}
|
||||
|
||||
// FIXME(stshine): The type of 'justify-content' and 'align-content' is uint16_t in gecko
|
||||
// FIXME(stshine): Its higher bytes are used to store fallback value. Disable them in geckolib for now
|
||||
${helpers.single_keyword("justify-content", "flex-start flex-end center space-between space-around",
|
||||
gecko_constant_prefix="NS_STYLE_JUSTIFY",
|
||||
products="servo",
|
||||
extra_prefixes="webkit",
|
||||
spec="https://drafts.csswg.org/css-flexbox/#justify-content-property",
|
||||
animatable=False)}
|
||||
% if product == "servo":
|
||||
// FIXME: Update Servo to support the same Syntax as Gecko.
|
||||
${helpers.single_keyword("justify-content", "stretch flex-start flex-end center space-between space-around",
|
||||
extra_prefixes="webkit",
|
||||
spec="https://drafts.csswg.org/css-flexbox/#justify-content-property",
|
||||
animatable=False)}
|
||||
% else:
|
||||
${helpers.predefined_type(name="justify-content",
|
||||
type="AlignJustifyContent",
|
||||
initial_value="specified::AlignJustifyContent::auto()",
|
||||
spec="https://drafts.csswg.org/css-flexbox/#justify-content-property",
|
||||
extra_prefixes="webkit",
|
||||
animatable=False)}
|
||||
% endif
|
||||
|
||||
// https://drafts.csswg.org/css-flexbox/#propdef-align-items
|
||||
// FIXME: This is a workaround for 'normal' value. We don't support the Gecko initial value 'normal' yet.
|
||||
|
@ -103,12 +109,20 @@ ${helpers.single_keyword("align-items", "stretch flex-start flex-end center base
|
|||
spec="https://drafts.csswg.org/css-flexbox/#align-items-property",
|
||||
animatable=False)}
|
||||
|
||||
${helpers.single_keyword("align-content", "stretch flex-start flex-end center space-between space-around",
|
||||
gecko_constant_prefix="NS_STYLE_ALIGN",
|
||||
products="servo",
|
||||
extra_prefixes="webkit",
|
||||
spec="https://drafts.csswg.org/css-flexbox/#align-content-property",
|
||||
animatable=False)}
|
||||
% if product == "servo":
|
||||
// FIXME: Update Servo to support the same Syntax as Gecko.
|
||||
${helpers.single_keyword("align-content", "stretch flex-start flex-end center space-between space-around",
|
||||
extra_prefixes="webkit",
|
||||
spec="https://drafts.csswg.org/css-flexbox/#align-content-property",
|
||||
animatable=False)}
|
||||
% else:
|
||||
${helpers.predefined_type(name="align-content",
|
||||
type="AlignJustifyContent",
|
||||
initial_value="specified::AlignJustifyContent::auto()",
|
||||
spec="https://drafts.csswg.org/css-flexbox/#align-content-property",
|
||||
extra_prefixes="webkit",
|
||||
animatable=False)}
|
||||
% endif
|
||||
|
||||
// Flex item properties
|
||||
${helpers.predefined_type("flex-grow", "Number",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue