Name-only container queriesBaseline · Newly available
Name-only container queries with the @container … at-rule apply styles to an element based on the name of the element's container alone.
Works in the latest version of every major browser, but older devices may not support it yet. Baseline since May 7, 2026.
Browser support
DesktopChrome
1–147Not supported
148+Supportedsince May 5, 2026
Current: 155Edge
12–147Not supported
148+Supportedsince May 7, 2026
Current: 154Firefox
1–148Not supported
149+Supportedsince Mar 24, 2026
Current: 157Safari
1–26.3Not supported
26.4+Supportedsince Mar 24, 2026
Current: 27MobileChrome Android
18–147Not supported
148+Supportedsince May 5, 2026
Current: 155Firefox Android
4–148Not supported
149+Supportedsince Mar 24, 2026
Current: 157Safari iOS
1–26.3Not supported
26.4+Supportedsince Mar 24, 2026
Current: 27How to use
Every current browser supports this, but it only became Baseline on May 7, 2026. Use it as a progressive enhancement, or keep a fallback if you support older devices.
Example
Full syntax and examples are on MDN — see the links below.
Feature detection
There’s no simple runtime check for this feature; rely on the support table and test in your target browsers.