mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Move flex-basis out of gecko_size_type.
This commit is contained in:
parent
45ba167030
commit
a0d0769998
3 changed files with 25 additions and 11 deletions
|
@ -933,6 +933,7 @@ impl LengthOrPercentageOrAuto {
|
|||
}
|
||||
|
||||
/// Returns a value representing `0%`.
|
||||
#[inline]
|
||||
pub fn zero_percent() -> Self {
|
||||
LengthOrPercentageOrAuto::Percentage(computed::Percentage::zero())
|
||||
}
|
||||
|
@ -1142,6 +1143,18 @@ impl MozLength {
|
|||
)?;
|
||||
Ok(MozLength::LengthOrPercentageOrAuto(length))
|
||||
}
|
||||
|
||||
/// Returns `auto`.
|
||||
#[inline]
|
||||
pub fn auto() -> Self {
|
||||
MozLength::LengthOrPercentageOrAuto(LengthOrPercentageOrAuto::auto())
|
||||
}
|
||||
|
||||
/// Returns `0%`.
|
||||
#[inline]
|
||||
pub fn zero_percent() -> Self {
|
||||
MozLength::LengthOrPercentageOrAuto(LengthOrPercentageOrAuto::zero_percent())
|
||||
}
|
||||
}
|
||||
|
||||
/// A value suitable for a `max-width` or `max-height` property.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue