Skip to content

elementSelectors

disposition: bound, direction: spec-to-css, basis: implementation

An anatomy rule of the CSS binding. The element types named below resolve jointly here — which type a node becomes, or what tag and semantics an element takes, is decided by this rule rather than per type.

Keys. text, glyph, vector, container, slot, instance, line, ellipse, rectangle

Operands

Every fact the rule reads. Nothing outside this set participates.

OperandFrom
element.keyspec document
context.rootAsemitting platform — class for React, host for Web Components

Cases

Ordered — first match wins.

#WhenEmitsWhy
1element.key = the component root.<block> under rootAs class; :host under rootAs hostThe root is the component, not an anatomy element — its selector is the block itself
2element.key present.<block>__<element> — one rule block per element key, nested under the root selector and its variant/state guardsThe element key, not the element type, names the block: types decide which keys apply, keys decide where

Otherwise

Nothing is emitted. — An element no variant styles emits no block

Everything generated sits in one @layer specs cascade layer, so consumer rules win without specificity races. The selector derivation is shared with the emitters — an element class the scaffold does not write would be a rule that matches nothing.