Skip to main content

Crate muskitty_selectors

Crate muskitty_selectors 

Source
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 by muskitty-css::tokenize and 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 the matching::Element trait. A reference implementation for muskitty-dom is provided as a dev-only integration.

§References

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.