mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
Implement a MinLength type
Implement an ExtremumLength type which contains all the enumerated keyword values for min-width, min-height, max-width, and max-height. Then, implement a MinLength which can be used for min-width and min-height. So far this just maps to Gecko values. Refs #13821.
This commit is contained in:
parent
063aec5ade
commit
76de979231
9 changed files with 199 additions and 10 deletions
|
@ -218,14 +218,23 @@ ${helpers.predefined_type("flex-basis",
|
|||
spec=spec % size,
|
||||
animatable=True, logical = logical)}
|
||||
|
||||
// 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",
|
||||
needs_context=False,
|
||||
spec=spec % ("min-%s" % size),
|
||||
animatable=True, logical = logical)}
|
||||
% if product == "gecko":
|
||||
// min-width, min-height, min-block-size, min-inline-size
|
||||
${helpers.predefined_type("min-%s" % size,
|
||||
"MinLength",
|
||||
"computed::MinLength::LengthOrPercentage(" +
|
||||
"computed::LengthOrPercentage::Length(Au(0)))",
|
||||
spec=spec % ("min-%s" % size),
|
||||
animatable=True, logical = logical)}
|
||||
% else:
|
||||
${helpers.predefined_type("min-%s" % size,
|
||||
"LengthOrPercentage",
|
||||
"computed::LengthOrPercentage::Length(Au(0))",
|
||||
"parse_non_negative",
|
||||
needs_context=False,
|
||||
spec=spec % ("min-%s" % size),
|
||||
animatable=True, logical = logical)}
|
||||
% endif
|
||||
|
||||
// max-width, max-height, max-block-size, max-inline-size
|
||||
${helpers.predefined_type("max-%s" % size,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue