monks/flex_shrink

The flex-shrink CSS property sets the flex shrink factor of a flex item. If the size of all flex items is larger than the flex container, the flex items can shrink to fit according to their flex-shrink value. Each flex line’s negative free space is distributed between the line’s flex items that have a flex-shrink value greater than 0.

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”)}}, flex-shrink, and {{cssxref(“flex-basis”)}}, which help to achieve the commonly desired flex behaviors.

Values

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

Enter a raw string value for flex-shrink

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

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

Search Document