mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
parent
29a55e5cbd
commit
eb22d33d4e
5 changed files with 22 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue