Skip to main content

Module selector

Module selector 

Source
Expand description

The CSS selector subset LGX understands — parsed ONCE, here.

Two very different things ask “what does this selector name”: the runtime engine that answers the count of ".row" against a live page, and the static check that refuses When "#draft" is clicked: when no view renders a #draft. If those two disagreed, a page would pass its checks and then fail to find its own elements. They cannot disagree, because they read the same parse.

The subset is what a page test and a page handler actually need: a descendant chain of compounds, each an optional tag plus any number of #id, .class, and [attr] / [attr=value] qualifiers. No sibling combinators, no pseudo-classes — those belong to stylesheets, and a stylesheet says them in Style: where real CSS is read verbatim.

Structs§

Compound
One compound selector: everything that must hold of a SINGLE element (li#a.done[x=1]).

Constants§

UNSUPPORTED_SYNTAX
The CSS syntax this engine deliberately does not read, and what to write instead.

Functions§

compound
Parse one compound.
parse
Parse a selector, or None when it is empty, malformed, or outside the subset.
unsupported
Why selector is outside the subset, or None when it is inside it.

Type Aliases§

Selector
A descendant chain: .card li.done is “a li.done anywhere inside a .card”.