pub enum Value {
Color(Color),
Length(Length),
LengthSet(Vec<Length>),
Keyword(String),
Auto,
Number(f64),
FontFamilyList(Vec<String>),
Border {
width: Length,
color: Color,
},
SideSet(Vec<SideValue>),
}Variants§
Color(Color)
Length(Length)
LengthSet(Vec<Length>)
1..=4 lengths, as in CSS shorthand: padding: 1px /
padding: 1px 2px / padding: 1px 2px 3px /
padding: 1px 2px 3px 4px.
Keyword(String)
Auto
auto keyword used with sizing and margin properties.
Number(f64)
Unitless number — flex-grow, flex-shrink, line-height,
font-weight (numeric form).
FontFamilyList(Vec<String>)
font-family list: one or more family names in source order.
Quoted strings and bare idents both land here as plain strings.
Border
border / border-{side} / outline shorthand.
style is dropped — floem has no border-style model; border: 1px none #fff treats none as zero width (same as omitting a
visible line). The solid token, if present, is accepted and
ignored.
SideSet(Vec<SideValue>)
1..=4 side values where each side may be a length or auto.
Used for margin / padding shorthands that contain auto.
Trade-off: a separate SideSet variant rather than making Length
an Option<Length> or adding Length::Auto. Keeping Length as
a pure numeric type avoids propagating auto-awareness into every
length consumer; adapters that only care about LengthSet stay
unchanged.