Skip to content

mizchi/css

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mizchi/css

Standalone CSS parser, selector matcher, cascade resolver, and computed-style engine for MoonBit.

Originally extracted from mizchi/crater (a CSS layout / browser engine) so the CSS pipeline can be reused by other tools (linters, formatters, static analyzers, alternative layout engines).

Packages

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 Facade re-exporting the most-used types

Web Platform Tests

wpt/ ships a runner that converts upstream WPT selector-parsing tests (css/selectors/parsing/**) into MoonBit test cases. After node wpt/extract.mjs && node wpt/gen-mbt.mjs, the suite is exercised with moon test --package mizchi/css/wpt215 / 215 tests passing (100%) against upstream WPT. See wpt/README.md.

License

Apache-2.0.

About

Standalone CSS parser, selector, cascade and computed-style engine for MoonBit (extracted from mizchi/crater)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors