Expand description
CSS selectors, as Selectors Level 4 defines them and browsers match them in a static page: parsed once, matched right to left.
What browsers do on a page nobody is looking at decides the rest:
:hover, :focus and the like parse but never match, as does a
pseudo-element (::before), since no element in a tree is one;
:scope is the element a query runs from, and ids and classes compare
exactly except in a quirks-mode document.
Structs§
- Match
Options - What matching needs that a document doesn’t carry. The default has
none of it, so
:targetand:local-linkmatch nothing. - Match
Timeout - A query that ran past
MatchOptions::budgetorMatchOptions::max_steps. - Parse
Options - What a stylesheet’s
@namespacerules would declare, forSelectorList::parse_with. The default declares nothing, asSelectorList::parsedoes. - Select
- The matches of
SelectorList::select_iter, in document order. - Selector
Error - A selector that couldn’t be parsed, and why.
- Selector
List - A comma-separated list of selectors; an element matches if any does.