mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
[css-multicol] style: Implement percentages for 'column-gap'.
Bug: 1398537 Reviewed-by: emilio,dholbert
This commit is contained in:
parent
9677d5c1ba
commit
3532f64b32
5 changed files with 26 additions and 12 deletions
|
@ -1445,7 +1445,7 @@ impl Clone for ${style_struct.gecko_struct_name} {
|
|||
"length::LengthOrAuto": impl_style_coord,
|
||||
"length::LengthOrNormal": impl_style_coord,
|
||||
"length::NonNegativeLengthOrAuto": impl_style_coord,
|
||||
"length::NonNegativeLengthOrNormal": impl_style_coord,
|
||||
"length::NonNegativeLengthOrPercentageOrNormal": impl_style_coord,
|
||||
"Length": impl_absolute_length,
|
||||
"LengthOrNormal": impl_style_coord,
|
||||
"LengthOrPercentage": impl_style_coord,
|
||||
|
|
|
@ -29,14 +29,21 @@ ${helpers.predefined_type(
|
|||
servo_restyle_damage="rebuild_and_reflow",
|
||||
)}
|
||||
|
||||
${helpers.predefined_type("column-gap",
|
||||
"length::NonNegativeLengthOrNormal",
|
||||
"Either::Second(Normal)",
|
||||
extra_prefixes="moz",
|
||||
servo_pref="layout.columns.enabled",
|
||||
animation_value_type="NonNegativeLengthOrNormal",
|
||||
spec="https://drafts.csswg.org/css-multicol/#propdef-column-gap",
|
||||
servo_restyle_damage = "reflow")}
|
||||
|
||||
<%
|
||||
# FIXME(#20498): Servo should support percentages in column-gap.
|
||||
col_gap_type = "NonNegativeLengthOrPercentageOrNormal" if product == "gecko" else "NonNegativeLengthOrNormal"
|
||||
%>
|
||||
${helpers.predefined_type(
|
||||
"column-gap",
|
||||
"length::%s" % col_gap_type,
|
||||
"Either::Second(Normal)",
|
||||
extra_prefixes="moz",
|
||||
servo_pref="layout.columns.enabled",
|
||||
animation_value_type=col_gap_type,
|
||||
spec="https://drafts.csswg.org/css-multicol/#propdef-column-gap",
|
||||
servo_restyle_damage = "reflow",
|
||||
)}
|
||||
|
||||
${helpers.single_keyword("column-fill", "balance auto", extra_prefixes="moz",
|
||||
products="gecko", animation_value_type="discrete",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue