v148 · CSS · Name-Only Container Queries
Component Isolation Demo
A design system with five components — card, button, badge, form, nav — each driven by named container queries alone, no container-type required. Toggle variants to see every component react, then explore the conflict resolver.
Theme matrix — pick a context
Card component
Context-aware content card driven by name-only @container rules.
Computed @container rules
Conflict resolver — duplicate name in ancestor chain
When two ancestor containers share the same container-name, the nearest ancestor wins for descendants inside it. Chrome 148's resolution: innermost named container takes precedence.
Outer ancestor sets container-name: theme-a
Inner ancestor also sets container-name: theme-a
@container theme-a rule resolves to the nearest ancestor with container-name: theme-a. Both outer and inner containers have this name, but CSS uses the closest matching ancestor.see also
references
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗