Expand description
MusKitty Selectors — Selectors Level 4 parser & matcher.
Implements the Selectors Level 4 specification (selector parsing, specificity calculation, and element matching) for the MusKitty browser engine.
§Architecture
- Parsing (
parser,types) — consumes a token stream produced bymuskitty-css::tokenizeand builds selector data structures (SelectorList / ComplexSelector / CompoundSelector / SubclassSelector / …). No DOM dependency. - Specificity (
specificity) — computes the A/B/C triplet per §17. - Matching (
matching) — matches parsed selectors against an element tree via thematching::Elementtrait. A reference implementation formuskitty-domis provided as a dev-only integration.
§References
- Selectors Level 4: https://drafts.csswg.org/selectors-4/
- Spec source (Markdown):
D:\CSSWG\selectors-4\Overview.md
Re-exports§
pub use specificity::Specificity;pub use matching::matches;pub use matching::query_selector;pub use matching::query_selector_all;pub use matching::Element;
Modules§
- error
- Selector parse errors.
- matching
- Selectors Level 4 §18 matching engine.
- parser
- Selectors Level 4 parser entry points.
- specificity
- §17 Calculating a selector’s specificity.
- types
- Selectors Level 4 §3 data model.