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.
| Operand | From |
|---|---|
element.key | spec document |
context.rootAs | emitting platform — class for React, host for Web Components |
Cases
Ordered — first match wins.
| # | When | Emits | Why |
|---|---|---|---|
| 1 | element.key = the component root | .<block> under rootAs class; :host under rootAs host | The root is the component, not an anatomy element — its selector is the block itself |
| 2 | element.key present | .<block>__<element> — one rule block per element key, nested under the root selector and its variant/state guards | The 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.