Note
Variants are property values styled through this shared system. They are not component-specific. See Builder components .
Problem
The active style condition is hidden in the Style Sources menu.
Condition selection is too closely tied to the selected token.
Users need to style eligible elements by property or attribute value.
Goals
Make the active style condition visible in the Style panel.
Separate condition selection from style-source selection.
Support CSS selectors, component-defined states, and property-value conditions.
Keep property-value styling usable without Builder components.
Keep the default condition list short; make other conditions searchable.
Model
A style condition determines when declarations apply.
Condition types:
CSS pseudo-classes and pseudo-elements.
Component-defined states.
Property-value conditions.
Custom selectors.
“Variant” describes styling one or more property values.
A variant is not a special property or component type.
Local styles and tokens store declarations for conditions.
Tokens do not own the element's available conditions.
Select a condition to edit or preview it.
Select Local or a token to choose where declarations are saved.
Style panel selector
Add an always-visible condition selector.
Keep it separate from Style Source selection.
Preview the selected condition on the canvas.
Default list includes conditions styled on the selected element's applied sources.
Always include the currently selected condition.
Add More… with search.
Group search results by condition type.
Do not list unrelated selectors from unapplied project tokens.
Show whether the selected source has styles for each condition.
After styles are saved, include the condition in the default list.
Selector notation
Preserve native CSS syntax: :hover, :focus-visible, ::placeholder.
Show component states using their metadata selector, such as [data-state="note"].
A state label may be supporting text; never replace the selector.
Show property conditions as property: value, using exact property spelling.
Keep custom selector syntax intact.
Selecting a condition changes the editing and preview context.
The selected source still determines where declarations are stored.
Property-value conditions
Fixed-choice properties
Define a finite set of values in property authoring.
Use each value as its label; do not define separate labels.
Set the default in property authoring.
Show each value as a one-click condition.
Example: select Appearance, then primary to activate appearance: primary.
Keep fixed-choice property authoring independent from this selector UI.
Open-value properties
Support exact-value conditions for eligible properties.
Do not enumerate open-ended values.
Let authors enter a specific exact value using the existing custom-selector flow.
Example: [data-label="Summer sale"].
Offer a known static or default value as a shortcut when available.
Only include values that can be serialized for selector matching.
Exclude complex values such as objects and arrays.
Allow exact string matches for open-ended string values.
CSS output
Keep the condition model semantic and independent of CSS output.
Do not make @container style() the definition of a variant.
@container style() is one possible output strategy.
It queries an ancestor container and cannot style that container itself.
Use attribute selectors or another scoped strategy when the element carrying the value must be styled.
Choose output based on scope, target element, and browser support.
Reference: MDN container style queries .
Reference: May 2026 Baseline digest .
Implementation batches
Batch 1 — Condition model and discovery
Batch 2 — Style panel selector
Batch 3 — Property-value conditions
Batch 4 — CSS output and compatibility
Acceptance criteria
The active condition is visible independently of Local/token selection.
The default list shows used conditions and the active condition.
Search finds other applicable conditions under More… .
CSS selectors, metadata states, property values, and custom selectors are distinguishable.
Selector notation preserves CSS syntax and property spelling.
Fixed-choice values are selectable with one click.
Open-value properties support exact matches without exhaustive option lists.
Styles apply to the intended element and compose with tokens and breakpoints.
Existing metadata states and custom selectors keep working.
CSS output remains an implementation choice, not part of variant semantics.
Related issues
Note
Variants are property values styled through this shared system. They are not component-specific. See Builder components.
Problem
Goals
Model
Style panel selector
Selector notation
:hover,:focus-visible,::placeholder.[data-state="note"].property: value, using exact property spelling.Property-value conditions
Fixed-choice properties
Appearance, thenprimaryto activateappearance: primary.Open-value properties
[data-label="Summer sale"].CSS output
@container style()the definition of a variant.@container style()is one possible output strategy.Implementation batches
Batch 1 — Condition model and discovery
Batch 2 — Style panel selector
Batch 3 — Property-value conditions
Batch 4 — CSS output and compatibility
Acceptance criteria
Related issues