Name-only @container queries are a new CSS feature shipping in Safari 26.4 that lets developers scope styles to named containers without requiring a size condition. Unlike traditional container queries that need a min-width or similar size constraint, name-only queries use just a container name as a filter. This solves the long-standing CSS naming problem — avoiding BEM verbosity, nesting-induced specificity wars, and the need for CSS modules — by letting styles be scoped to a named container without adding specificity. Developers register containers with container-name and container-type, then wrap component styles in matching @container blocks.

4m read timeFrom webkit.org
Post cover image
Table of contents
What is the solution?How to use itBrowser Support
2 Comments

Sort: