servo/components/style/values/computed/flex.rs
Emilio Cobos Álvarez f7a59bf0ee style: Use Rust sizes for flex-basis, width, height, and their min/max properties.
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
2019-02-23 21:02:18 -08:00

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())
}
}