Expand description
Hash-able floating-point wrappers, percentage values, and CSS size metric types used by the CSS property system.
Structs§
- Float
Value - Wrapper around an f32 value that is internally casted to an isize, in order to provide hash-ability (to avoid numerical instability).
- Percentage
Value - Wrapper around
FloatValue, represents a percentage instead of just being a regular floating-point value, i.e5=5%
Enums§
- Option
Percentage Value - Percentage
Parse Error - Percentage
Parse Error Owned - Size
Metric - Enum representing the metric associated with a number (px, pt, em, etc.)
Constants§
- FP_
PRECISION_ MULTIPLIER - Multiplier for floating point accuracy.
Functions§
- parse_
float_ value - Errors
- parse_
percentage_ value - Parse “1.2” or “120%” (similar to
parse_pixel_value)