Auto merge of #15606 - mbrubeck:align-items, r=Manishearth

stylo: Implement align-items and justify-items

Stylo-only patch to match Gecko property support. Part of #15001. r? @Manishearth

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15606)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-02-18 22:26:06 -08:00 committed by GitHub
commit 72b76458b7
5 changed files with 183 additions and 13 deletions

View file

@ -99,22 +99,19 @@ ${helpers.single_keyword("flex-wrap", "nowrap wrap wrap-reverse",
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.
${helpers.single_keyword("align-items", "stretch flex-start flex-end center baseline" if product == "servo"
else "normal stretch flex-start flex-end center baseline",
need_clone=True,
extra_prefixes="webkit",
gecko_constant_prefix="NS_STYLE_ALIGN",
spec="https://drafts.csswg.org/css-flexbox/#align-items-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-align/#propdef-align-content",
animatable=False)}
${helpers.single_keyword("align-items",
"stretch flex-start flex-end center baseline",
need_clone=True,
extra_prefixes="webkit",
spec="https://drafts.csswg.org/css-flexbox/#align-items-property",
animatable=False)}
% else:
${helpers.predefined_type(name="align-content",
type="AlignJustifyContent",
@ -122,6 +119,19 @@ ${helpers.single_keyword("align-items", "stretch flex-start flex-end center base
spec="https://drafts.csswg.org/css-align/#propdef-align-content",
extra_prefixes="webkit",
animatable=False)}
${helpers.predefined_type(name="align-items",
type="AlignItems",
initial_value="specified::AlignItems::normal()",
spec="https://drafts.csswg.org/css-align/#propdef-align-items",
extra_prefixes="webkit",
animatable=False)}
${helpers.predefined_type(name="justify-items",
type="JustifyItems",
initial_value="specified::JustifyItems::auto()",
spec="https://drafts.csswg.org/css-align/#propdef-justify-items",
animatable=False)}
% endif
// Flex item properties