Expand description
CSS subset parser for EPUB styling
Parses a minimal subset of CSS sufficient for EPUB rendering:
- Font properties:
font-size,font-family,font-weight,font-style - Text:
text-align,line-height,letter-spacing - Spacing:
margin-top,margin-bottom - Selectors: tag, class, and inline
styleattributes
Complex selectors, floats, positioning, and grid are out of scope.
Structs§
- CssRule
- A single CSS rule (selector + declarations)
- CssStyle
- A set of CSS property values
- Stylesheet
- A parsed CSS stylesheet
Enums§
- CssSelector
- A CSS selector (subset)
- Font
Size - Font size value
- Font
Style - Font style
- Font
Weight - Font weight
- Line
Height - Line height value
- Text
Align - Text alignment
Functions§
- parse_
inline_ style - Parse an inline
styleattribute value into aCssStyle - parse_
stylesheet - Parse a CSS stylesheet string into a
Stylesheet