Skip to content
Permalink
Browse files

Fix inline margins of in flow blocks in 2020

  • Loading branch information
nox authored and SimonSapin committed Nov 29, 2019
1 parent 48a4a82 commit f24e8d0557c6cb51fac0a5e8ff4046ec6a1717d3
Showing with 4 additions and 7 deletions.
  1. +4 −7 components/layout_2020/flow/mod.rs
@@ -369,16 +369,13 @@ fn layout_in_flow_non_replaced_block_level<'a>(
*s = LengthOrAuto::LengthPercentage(inline_margins / 2.);
*e = LengthOrAuto::LengthPercentage(inline_margins / 2.);
},
(s @ &mut LengthOrAuto::Auto, _) => {
*s = LengthOrAuto::LengthPercentage(inline_margins);
(s @ &mut LengthOrAuto::Auto, &mut LengthOrAuto::LengthPercentage(e)) => {
*s = LengthOrAuto::LengthPercentage(inline_margins - e);
},
(_, e @ &mut LengthOrAuto::Auto) => {
*e = LengthOrAuto::LengthPercentage(inline_margins);
},
(_, e @ _) => {
(&mut LengthOrAuto::LengthPercentage(s), e) => {
// Either the inline-end margin is auto,
// or we’re over-constrained and we do as if it were.
*e = LengthOrAuto::LengthPercentage(inline_margins);
*e = LengthOrAuto::LengthPercentage(inline_margins - s);
},
}
}

0 comments on commit f24e8d0

Please sign in to comment.
You can’t perform that action at this time.