style/values/computed/
flex.rs

1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
5//! Computed types for CSS values related to flexbox.
6
7use crate::values::computed::Size;
8use crate::values::generics::flex::FlexBasis as GenericFlexBasis;
9
10/// A computed value for the `flex-basis` property.
11pub type FlexBasis = GenericFlexBasis<Size>;
12
13impl FlexBasis {
14    /// `auto`
15    #[inline]
16    pub fn auto() -> Self {
17        GenericFlexBasis::Size(Size::auto())
18    }
19}