mirror of
https://github.com/servo/servo.git
synced 2025-06-27 10:33:39 +01:00
Really sorry for the size of the patch :( Only intentional behavior change is in the uses of HasLengthAndPercentage(), where it's easier to do the right thing. The checks that used to check for (IsCalcUnit() && CalcHasPercentage()) are wrong since bug 957915. Differential Revision: https://phabricator.services.mozilla.com/D19553
19 lines
589 B
Rust
19 lines
589 B
Rust
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
//! Computed types for CSS values related to flexbox.
|
|
|
|
use crate::values::computed::Size;
|
|
use crate::values::generics::flex::FlexBasis as GenericFlexBasis;
|
|
|
|
/// A computed value for the `flex-basis` property.
|
|
pub type FlexBasis = GenericFlexBasis<Size>;
|
|
|
|
impl FlexBasis {
|
|
/// `auto`
|
|
#[inline]
|
|
pub fn auto() -> Self {
|
|
GenericFlexBasis::Size(Size::auto())
|
|
}
|
|
}
|