Standalone CSS parser, selector, cascade and computed-style engine for MoonBit
| Package | Responsibility |
|---|---|
| mizchi/css/values | CSS value primitives (Color, Length, Dimension, Display, Position, Overflow, BoxSizing, FlexDirection, grid track sizing, etc.) |
| mizchi/css/style | Computed Style struct (resolved declarations + per-element style) |
| mizchi/css/token | CSS tokenizer |
| mizchi/css/selector | Selector parser and matcher |
| mizchi/css/cascade | Cascade rules, rule indexing, importance, origin handling |
| mizchi/css/media | @media queries, evaluation |
| mizchi/css/diagnostics | Parse / cascade diagnostics |
| mizchi/css/parser | Stylesheet parser (declarations, at-rules, selectors) |
| mizchi/css/computed | Computed-style resolution (cascade output → Style) |
| mizchi/css/animation | Web Animations timing model and numeric keyframe sampling |
| mizchi/css | Facade re-exporting the most-used types |
fn apply_property_direct(style : Style, property : String, value : String, ctx : ComputeContext) -> Stylefn cascade_element(element : Element, stylesheets : Array[Stylesheet], inline_style : Array[Declaration]) -> CascadedValuesfn cascade_element_indexed(element : Element, stylesheets : Array[IndexedStylesheet], inline_style : Array[Declaration], media_env : MediaEnvironment?) -> CascadedValuesfn cascade_element_with_media(element : Element, stylesheets : Array[Stylesheet], inline_style : Array[Declaration], media_env : MediaEnvironment?) -> CascadedValuesfn compute_style_with_vars(cascaded : CascadedValues, ctx : ComputeContext) -> (Style, Map[String, String])fn matches_selector_list_with_shadow_context(element : Element, selector_list : SelectorList, context : ShadowContext?) -> Boolfn matches_selector_with_shadow_context(element : Element, selector : ComplexSelector, context : ShadowContext?) -> BoolInstall
Download zipStandalone CSS parser, selector, cascade and computed-style engine for MoonBit