monks/flex_basis

The flex-basis CSS property sets the initial main size of a {{glossary(“flex item”)}}. It sets the size of the content box unless otherwise set with {{Cssxref(“box-sizing”)}}.

It is recommended to use the {{cssxref(“flex”)}} shorthand with a keyword value like auto or initial instead of setting flex-basis on its own. The keyword values expand to reliable combinations of {{cssxref(“flex-grow”)}}, {{cssxref(“flex-shrink”)}}, and flex-basis, which help to achieve the commonly desired flex behaviors.

Values

pub const auto_: #(String, String)

auto value of flex-basis

pub const content: #(String, String)
  • : Indicates automatic sizing, based on the flex item’s content.
pub const fit_content: #(String, String)
pub const inherit: #(String, String)
pub const initial: #(String, String)
pub const intrinsic: #(String, String)

intrinsic value of flex-basis

pub fn length(value: monks_of_style.Length) -> #(String, String)

length value of flex-basis

pub const max_content: #(String, String)

max-content value of flex-basis

pub const min_content: #(String, String)

min-content value of flex-basis

pub const min_intrinsic: #(String, String)

min-intrinsic value of flex-basis

pub fn raw(value: String) -> #(String, String)

Enter a raw string value for flex-basis

pub const revert: #(String, String)
pub const revert_layer: #(String, String)
pub const stretch: #(String, String)

stretch value of flex-basis

pub const unset: #(String, String)
pub fn var(variable: String) -> #(String, String)

Enter a variable name to be used for flex-basis. It will be wrapped in var() and have -- prepended.

Search Document