mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Use rust lengths for row-gap / column-gap.
Differential Revision: https://phabricator.services.mozilla.com/D26915
This commit is contained in:
parent
0f57b7b833
commit
0a84073767
8 changed files with 48 additions and 72 deletions
|
@ -219,3 +219,38 @@ impl<L, N: Zero> Zero for LengthOrNumber<L, N> {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A generic `<length-percentage>` | normal` value.
|
||||
#[derive(
|
||||
Animate,
|
||||
Clone,
|
||||
ComputeSquaredDistance,
|
||||
Copy,
|
||||
Debug,
|
||||
MallocSizeOf,
|
||||
Parse,
|
||||
PartialEq,
|
||||
SpecifiedValueInfo,
|
||||
ToAnimatedValue,
|
||||
ToAnimatedZero,
|
||||
ToComputedValue,
|
||||
ToCss,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
)]
|
||||
#[repr(C, u8)]
|
||||
#[allow(missing_docs)]
|
||||
pub enum GenericLengthPercentageOrNormal<LengthPercent> {
|
||||
LengthPercentage(LengthPercent),
|
||||
Normal,
|
||||
}
|
||||
|
||||
pub use self::GenericLengthPercentageOrNormal as LengthPercentageOrNormal;
|
||||
|
||||
impl<LengthPercent> LengthPercentageOrNormal<LengthPercent> {
|
||||
/// Returns the normal value.
|
||||
#[inline]
|
||||
pub fn normal() -> Self {
|
||||
LengthPercentageOrNormal::Normal
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue