mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Add support for inline-size, block-size, and max-*-size/min-*-size
This commit is contained in:
parent
f974719d9f
commit
5fad7b0ff6
4 changed files with 62 additions and 42 deletions
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
<%namespace name="helpers" file="/helpers.mako.rs" />
|
||||
<% from data import ALL_SIZES %>
|
||||
|
||||
<% data.new_style_struct("Position", inherited=False) %>
|
||||
|
||||
|
@ -137,41 +138,28 @@ ${helpers.predefined_type("flex-basis",
|
|||
"computed::LengthOrPercentageOrAutoOrContent::Auto",
|
||||
animatable=False)}
|
||||
|
||||
${helpers.predefined_type("width",
|
||||
"LengthOrPercentageOrAuto",
|
||||
"computed::LengthOrPercentageOrAuto::Auto",
|
||||
"parse_non_negative",
|
||||
animatable=True)}
|
||||
% for (size, logical) in ALL_SIZES:
|
||||
// width, height, block-size, inline-size
|
||||
${helpers.predefined_type("%s" % size,
|
||||
"LengthOrPercentageOrAuto",
|
||||
"computed::LengthOrPercentageOrAuto::Auto",
|
||||
"parse_non_negative",
|
||||
animatable=True, logical = logical)}
|
||||
|
||||
${helpers.predefined_type("height",
|
||||
"LengthOrPercentageOrAuto",
|
||||
"computed::LengthOrPercentageOrAuto::Auto",
|
||||
"parse_non_negative",
|
||||
animatable=True)}
|
||||
// min-width, min-height, min-block-size, min-inline-size
|
||||
${helpers.predefined_type("min-%s" % size,
|
||||
"LengthOrPercentage",
|
||||
"computed::LengthOrPercentage::Length(Au(0))",
|
||||
"parse_non_negative",
|
||||
animatable=True, logical = logical)}
|
||||
|
||||
${helpers.predefined_type("min-width",
|
||||
"LengthOrPercentage",
|
||||
"computed::LengthOrPercentage::Length(Au(0))",
|
||||
"parse_non_negative",
|
||||
animatable=True)}
|
||||
|
||||
${helpers.predefined_type("max-width",
|
||||
"LengthOrPercentageOrNone",
|
||||
"computed::LengthOrPercentageOrNone::None",
|
||||
"parse_non_negative",
|
||||
animatable=True)}
|
||||
|
||||
${helpers.predefined_type("min-height",
|
||||
"LengthOrPercentage",
|
||||
"computed::LengthOrPercentage::Length(Au(0))",
|
||||
"parse_non_negative",
|
||||
animatable=True)}
|
||||
|
||||
${helpers.predefined_type("max-height",
|
||||
"LengthOrPercentageOrNone",
|
||||
"computed::LengthOrPercentageOrNone::None",
|
||||
"parse_non_negative",
|
||||
animatable=True)}
|
||||
// max-width, max-height, max-block-size, max-inline-size
|
||||
${helpers.predefined_type("max-%s" % size,
|
||||
"LengthOrPercentageOrNone",
|
||||
"computed::LengthOrPercentageOrNone::None",
|
||||
"parse_non_negative",
|
||||
animatable=True, logical = logical)}
|
||||
% endfor
|
||||
|
||||
${helpers.single_keyword("box-sizing",
|
||||
"content-box border-box",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue