Skip to main content

Module value

Module value 

Source
Expand description

Property values. v1 covers the handful needed by phase-1 properties (background-color, color, padding, margin, width, height); phase-2 adds Auto, Number, FontFamilyList, Border, and SideSet for mixed length/auto shorthands.

Structs§

Color

Enums§

Length
Length carries f64 payloads so it intentionally only implements PartialEqf64 is not Eq. By extension, Value::LengthSet and any container of Value cannot be Eq either. Adapters that want hashable/Eq-equivalent comparison should compare a derived representation (e.g. rendered floem Style).
SideValue
One side in a mixed length/auto shorthand (margin: 4px auto).
Value

Functions§

expand_side_set
Expand a 1..=4 SideValue shorthand to four sides.
expand_sides
Expand a 1..=4 length shorthand to the four sides (top, right, bottom, left). Mirrors CSS’s padding / margin rules.