euv_core/style/length/enum.rs
1/// CSS-compatible deterministic layout length unit.
2#[derive(Clone, Copy, Debug, Default, PartialEq)]
3pub enum Length {
4 /// Automatic size determined by content or parent constraints.
5 #[default]
6 Auto,
7 /// Device-independent logical pixels.
8 Px(f32),
9 /// Percentage of the parent container's dimension in `[0.0, 100.0]`.
10 Percent(f32),
11 /// Fraction of remaining free space for grid tracks (`fr`).
12 Fraction(f32),
13 /// Percentage of the root viewport width (`vw`).
14 ViewportWidth(f32),
15 /// Percentage of the root viewport height (`vh`).
16 ViewportHeight(f32),
17}