Expand description
Unit types and helpers for Floem styles.
Floem’s length model is intentionally small:
Ptis the primary absolute length unit exposed by the style API.Pctresolves against a property-specific basis such as parent size.Emresolves against the current element’s computed font size.Lhresolves against the current element’s computed line height.
Floem treats absolute lengths as logical layout points rather than device pixels. The renderer later maps those logical values through the window scale factor, so callers should generally think in view-space measurements, not physical screen pixels.
Relative text units are scoped to the current element. Floem does not currently define a separate root-level font-size or line-height unit in this module.
Structs§
- Anchor
About - Anchor point for transform-origin, used with rotate and scale transformations.
- Auto
- Used for automatically computed values
- Em
- A length relative to the current element’s computed font size.
- Font
Size Cx - Lh
- A length relative to the current element’s computed line height.
- Pct
- A percent value
- Pt
- An absolute length value in Floem layout points.
- Px
Deprecated
Enums§
- Angle
- An angle value that can be in degrees or radians.
- Length
- Length
Auto - Line
Height Value - Specifies how line height is computed for text layout.
- PxPct
Deprecated - PxPct
Auto Deprecated