style: Add a "start_end()" method to LogicalMargin

Add a `LogicalMargin::start_end()` method that receives a `Direction'
parameter. This is useful for some layout that is symmetric in inline
and block directions, like flexbox.
This commit is contained in:
Pu Xingyu 2016-11-08 23:33:56 +08:00
parent 29a55e5cbd
commit eb22d33d4e
5 changed files with 22 additions and 12 deletions

View file

@ -504,13 +504,6 @@ impl ToGfxMatrix for ComputedMatrix {
}
}
// Used to specify the logical direction.
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum Direction {
Inline,
Block
}
// https://drafts.csswg.org/css2/visudet.html#min-max-widths
// https://drafts.csswg.org/css2/visudet.html#min-max-heights
/// A min or max constraint