← Chrome 149 reference

v149 · css · developer trial

Comma-separated Container Queries

Chrome 149 lets you write multiple @container conditions in a single rule, separated by commas. The block applies if any one of the conditions matches — the same OR semantics as comma-separated @media queries.

Developer trial / behind a flag Comma-separated Container Queries is in developer trial in Chrome 149 — enable via chrome://flags/#enable-experimental-web-platform-features to test. Ships as enabled by default in Chrome 150.

at a glance

Status in 149In developer trial (behind a flag)
Ships by defaultChrome 150
Flagchrome://flags/#enable-experimental-web-platform-features
Standards positionFirefox: Shipped  ·  Safari: No signal
SpecCSS Conditional Rules Level 5 §@container
ChromeStatus6196591858941952 — Comma-separated Container Queries

why it exists

Container queries already have and, or, and not logic inside a single condition. But you couldn't write two separate conditions in the same rule that applied if either matched — you had to duplicate the entire rule body. Comma separation mirrors the @media pattern: each comma-separated entry is an independent condition; the block applies if at least one passes. The main use-case is feature-query fallbacks: you can list a new container feature first, then fall back to a simpler width query for browsers that don't support it yet.

Source: chromestatus summary + CSS Conditional Rules Level 5.

syntax

/* Before: two identical rule bodies */
@container sidebar (min-width: 300px) {
  .card { flex-direction: row; }
}
@container sidebar (style(--layout: horizontal)) {
  .card { flex-direction: row; }
}

/* After: one rule, OR semantics */
@container sidebar (min-width: 300px),
           sidebar (style(--layout: horizontal)) {
  .card { flex-direction: row; }
}

You can also target different named containers in the same comma list:

/* Apply if EITHER container matches */
@container main (min-width: 600px),
           sidebar (min-width: 200px) {
  .widget { display: grid; }
}
Source: chromestatus summary examples + CSS Conditional Rules 5 §container-rule.

recipes

Feature + fallback width query

/* Use scroll-state() where supported; fall back to width for older browsers */
@container card (scroll-state(stuck: top)),
           card (min-width: 400px) {
  .card-header {
    position: sticky;
    top: 0;
    background: white;
  }
}

Targeting alternate container names

.sidebar { container: sidebar / inline-size; }
.main    { container: main   / inline-size; }

/* Compact layout if EITHER column is narrow */
@container sidebar (max-width: 200px),
           main    (max-width: 400px) {
  nav { display: none; }
}

browser support

Chrome149
Edge149 (Chromium)
FirefoxShipped
SafariNo signal
Source: chromestatus browser views at time of generation.

see also