mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
layout: make margin
in pbm
use app unit (#31621)
* make margin in pbm use app unit * Simplification * Consistently resolve inline margins as Au, like block margins --------- Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
0b4b544910
commit
0fda14263a
8 changed files with 119 additions and 114 deletions
|
@ -126,8 +126,8 @@ impl<T: Zero> LogicalVec2<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl LogicalVec2<LengthOrAuto> {
|
||||
pub fn auto_is(&self, f: impl Fn() -> Length) -> LogicalVec2<Length> {
|
||||
impl<T: Clone> LogicalVec2<AutoOr<T>> {
|
||||
pub fn auto_is(&self, f: impl Fn() -> T) -> LogicalVec2<T> {
|
||||
self.map(|t| t.auto_is(&f))
|
||||
}
|
||||
}
|
||||
|
@ -335,8 +335,8 @@ impl LogicalSides<LengthPercentageOrAuto<'_>> {
|
|||
}
|
||||
}
|
||||
|
||||
impl LogicalSides<LengthOrAuto> {
|
||||
pub fn auto_is(&self, f: impl Fn() -> Length) -> LogicalSides<Length> {
|
||||
impl<T: Clone> LogicalSides<AutoOr<T>> {
|
||||
pub fn auto_is(&self, f: impl Fn() -> T) -> LogicalSides<T> {
|
||||
self.map(|s| s.auto_is(&f))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue