Expand description
CSS Parser
Tokenizes and parses CSS stylesheets into structured rule sets. Supports selectors (tag, class, id, descendant, child, universal, compound), declarations with typed values, and specificity calculation. All numeric values use 26.6 fixed-point (i32).
Structs§
- CssParser
- CSS parser
- CssRule
- A CSS rule (selectors + declarations)
- CssTokenizer
- CSS tokenizer
- Declaration
- A CSS declaration (property: value)
- Simple
Selector - A simple CSS selector
- Specificity
- Specificity: (id_count, class_count, tag_count)
- Stylesheet
- A parsed CSS stylesheet
Enums§
Functions§
- fp_
to_ px - Convert 26.6 fixed-point to pixels
- named_
color - Named CSS colors
- parse_
hex_ color - Parse a hex color string to ARGB u32
- px_
to_ fp - Convert pixels to 26.6 fixed-point
Type Aliases§
- Fixed
Point - 26.6 fixed-point type: multiply pixel values by 64