|
@@ -319,7 +319,7 @@ void StyleSheetSpecification::RegisterDefaultProperties()
|
|
|
RegisterProperty(PropertyId::BorderBottomLeftRadius, "border-bottom-left-radius", "0px", false, false).AddParser("length");
|
|
RegisterProperty(PropertyId::BorderBottomLeftRadius, "border-bottom-left-radius", "0px", false, false).AddParser("length");
|
|
|
RegisterShorthand(ShorthandId::BorderRadius, "border-radius", "border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius", ShorthandType::Box);
|
|
RegisterShorthand(ShorthandId::BorderRadius, "border-radius", "border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius", ShorthandType::Box);
|
|
|
|
|
|
|
|
- RegisterProperty(PropertyId::Display, "display", "inline", false, true).AddParser("keyword", "none, block, inline, inline-block, table, table-row, table-row-group, table-column, table-column-group, table-cell");
|
|
|
|
|
|
|
+ RegisterProperty(PropertyId::Display, "display", "inline", false, true).AddParser("keyword", "none, block, inline, inline-block, flex, table, table-row, table-row-group, table-column, table-column-group, table-cell");
|
|
|
RegisterProperty(PropertyId::Position, "position", "static", false, true).AddParser("keyword", "static, relative, absolute, fixed");
|
|
RegisterProperty(PropertyId::Position, "position", "static", false, true).AddParser("keyword", "static, relative, absolute, fixed");
|
|
|
RegisterProperty(PropertyId::Top, "top", "auto", false, false)
|
|
RegisterProperty(PropertyId::Top, "top", "auto", false, false)
|
|
|
.AddParser("keyword", "auto")
|
|
.AddParser("keyword", "auto")
|
|
@@ -422,6 +422,22 @@ void StyleSheetSpecification::RegisterDefaultProperties()
|
|
|
// Rare properties (not added to computed values)
|
|
// Rare properties (not added to computed values)
|
|
|
RegisterProperty(PropertyId::FillImage, "fill-image", "", false, false).AddParser("string");
|
|
RegisterProperty(PropertyId::FillImage, "fill-image", "", false, false).AddParser("string");
|
|
|
|
|
|
|
|
|
|
+ // Flexbox
|
|
|
|
|
+ RegisterProperty(PropertyId::AlignContent, "align-content", "stretch", false, true).AddParser("keyword", "flex-start, flex-end, center, space-between, space-around, stretch");
|
|
|
|
|
+ RegisterProperty(PropertyId::AlignItems, "align-items", "stretch", false, true).AddParser("keyword", "flex-start, flex-end, center, baseline, stretch");
|
|
|
|
|
+ RegisterProperty(PropertyId::AlignSelf, "align-self", "auto", false, true).AddParser("keyword", "auto, flex-start, flex-end, center, baseline, stretch");
|
|
|
|
|
+
|
|
|
|
|
+ RegisterProperty(PropertyId::FlexBasis, "flex-basis", "auto", false, true).AddParser("keyword", "auto").AddParser("length_percent");
|
|
|
|
|
+ RegisterProperty(PropertyId::FlexDirection, "flex-direction", "row", false, true).AddParser("keyword", "row, row-reverse, column, column-reverse");
|
|
|
|
|
+
|
|
|
|
|
+ RegisterProperty(PropertyId::FlexGrow, "flex-grow", "0", false, true).AddParser("number");
|
|
|
|
|
+ RegisterProperty(PropertyId::FlexShrink, "flex-shrink", "1", false, true).AddParser("number");
|
|
|
|
|
+ RegisterProperty(PropertyId::FlexWrap, "flex-wrap", "nowrap", false, true).AddParser("keyword", "nowrap, wrap, wrap-reverse");
|
|
|
|
|
+ RegisterProperty(PropertyId::JustifyContent, "justify-content", "flex-start", false, true).AddParser("keyword", "flex-start, flex-end, center, space-between, space-around");
|
|
|
|
|
+
|
|
|
|
|
+ RegisterShorthand(ShorthandId::Flex, "flex", "flex-grow, flex-shrink, flex-basis", ShorthandType::FallThrough); // Todo: 'none' keyword
|
|
|
|
|
+ RegisterShorthand(ShorthandId::FlexFlow, "flex-flow", "flex-direction, flex-wrap", ShorthandType::FallThrough);
|
|
|
|
|
+
|
|
|
RMLUI_ASSERTMSG(instance->properties.shorthand_map->AssertAllInserted(ShorthandId::NumDefinedIds), "Missing specification for one or more Shorthand IDs.");
|
|
RMLUI_ASSERTMSG(instance->properties.shorthand_map->AssertAllInserted(ShorthandId::NumDefinedIds), "Missing specification for one or more Shorthand IDs.");
|
|
|
RMLUI_ASSERTMSG(instance->properties.property_map->AssertAllInserted(PropertyId::NumDefinedIds), "Missing specification for one or more Property IDs.");
|
|
RMLUI_ASSERTMSG(instance->properties.property_map->AssertAllInserted(PropertyId::NumDefinedIds), "Missing specification for one or more Property IDs.");
|
|
|
}
|
|
}
|