mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Add support for 'flex-basis:content' in the style system.
Bug: 1105111 Reviewed-by: xidorn MozReview-Commit-ID: 5WhgHJJ0mDB
This commit is contained in:
parent
3532f64b32
commit
744809a8b2
13 changed files with 197 additions and 142 deletions
|
@ -4,8 +4,23 @@
|
|||
|
||||
//! Computed types for CSS values related to flexbox.
|
||||
|
||||
use values::computed::length::LengthOrPercentage;
|
||||
use values::generics::flex::FlexBasis as GenericFlexBasis;
|
||||
|
||||
/// The `width` value type.
|
||||
#[cfg(feature = "servo")]
|
||||
pub type Width = ::values::computed::NonNegativeLengthOrPercentageOrAuto;
|
||||
|
||||
/// The `width` value type.
|
||||
#[cfg(feature = "gecko")]
|
||||
pub type Width = ::values::computed::MozLength;
|
||||
|
||||
/// A computed value for the `flex-basis` property.
|
||||
pub type FlexBasis = GenericFlexBasis<LengthOrPercentage>;
|
||||
pub type FlexBasis = GenericFlexBasis<Width>;
|
||||
|
||||
impl FlexBasis {
|
||||
/// `auto`
|
||||
#[inline]
|
||||
pub fn auto() -> Self {
|
||||
GenericFlexBasis::Width(Width::auto())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue