flex.rs (589B)
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 7 use crate::values::computed::Size; 8 use crate::values::generics::flex::FlexBasis as GenericFlexBasis; 9 10 /// A computed value for the `flex-basis` property. 11 pub type FlexBasis = GenericFlexBasis<Size>; 12 13 impl FlexBasis { 14 /// `auto` 15 #[inline] 16 pub fn auto() -> Self { 17 GenericFlexBasis::Size(Size::auto()) 18 } 19 }