Skip to main content

Module basic

Module basic 

Source
Expand description

Basic / primitive CSS property types and their parsing code.

This barrel module collects the foundational types used throughout css::props::layout, css::props::style, and css::props::property:

  • angle — angle units (deg, rad, grad, turn)
  • animation — animation / transition descriptors
  • color — color values and parsing (rgb, hsl, named colors, …)
  • direction — directional enums (LTR / RTL, writing modes)
  • error — CSS-parsing error types
  • font — font-family, font-weight, and related types
  • geometry — geometric primitives (points, sizes, rects)
  • length — CSS length units (px, em, %, …)
  • parse — shared low-level parsing helpers (not glob-re-exported; use qualified paths, e.g. basic::parse::parse_pixel_value)
  • pixel — device-pixel types
  • time — duration / time units

Re-exports§

pub use self::parse::CssImageParseError;
pub use self::parse::CssImageParseErrorOwned;
pub use self::parse::parse_image;
pub use self::angle::*;
pub use self::animation::*;
pub use self::color::*;
pub use self::direction::*;
pub use self::error::*;
pub use self::font::*;
pub use self::geometry::*;
pub use self::length::*;
pub use self::pixel::*;
pub use self::time::*;

Modules§

angle
CSS property types for angles (degrees, radians, etc.).
animation
SVG geometry primitives (points, curves, rects, vectors) and animation interpolation functions.
color
CSS color types and parser.
direction
CSS property types for direction (for gradients).
error
C-compatible (#[repr(C)]) error types for CSS parsing failures.
font
CSS properties for fonts, such as font-family, font-size, font-weight, and font-style.
geometry
Basic geometry primitives (LayoutPoint, LayoutSize, LayoutRect) for layout calculations, using isize coordinates (as opposed to the f32-based logical coordinates in core::geom).
length
Hash-able floating-point wrappers, percentage values, and CSS size metric types used by the CSS property system.
parse
Shared low-level parsing helpers — not glob-re-exported because its items are meant to be used via qualified paths. CSS string parsing utilities: parenthesized expressions, quote stripping, comma/whitespace-aware splitting that respects nesting depth, and CSS image/url path parsing.
pixel
CSS length and pixel value types, parsing, and unit resolution.
time
CSS property types for time durations (s, ms).