The Neon Void
DJ Sloppy Droppy
Then the acts, then whoever is left.
Exhibit 23 of 23
Pick the set. The poster changes its whole look. The picks only set one custom property; the poster reads it with a style query.
The Neon Void
Then the acts, then whoever is left.
Each pick sets --set on the frame around the poster (by :has(), since there is no script to set it). The poster never looks at the picks. It asks its container instead: @container style(--set: peak) is true when the nearest container’s --set is peak, and every element is a container for style queries without being told.
That is the point of them: a component dresses itself by a variable it inherits, whoever set it. Here it is three radio buttons; on a real site it could be a theme, a season or a parent component.
Cut from this exhibit’s stylesheet as it is served.
/* the picks set one variable on the frame, and nothing else */
.x-mood .mood:has(#set-warmup:checked) .frame { --set: warmup; }
.x-mood .mood:has(#set-peak:checked) .frame { --set: peak; }
.x-mood .mood:has(#set-closing:checked) .frame { --set: closing; }
/* the poster dresses itself by that variable, asked for with a style query */
@container style(--set: peak) {
.x-mood .poster { background: #ff4fa3; color: #170a14; rotate: -2deg; }
.x-mood .poster h3 { font-size: clamp(38px, 7vw, 64px); text-transform: uppercase; }
}
@container style(--set: closing) {
.x-mood .poster { background: #20232e; color: #c9cede; }
.x-mood .poster h3 { font-weight: 400; font-style: italic; }
}
The sets are labelled radio buttons, and the line on the poster says which is picked (by :has(), so it is right even where style queries aren’t). The colours in every set keep the text above 4.5:1. The tilt at peak time stays put and isn’t animated under reduced motion.
container style queries CSS can’t test for this one. Without it: The poster keeps its warm-up look whatever you pick; the line on it still says which set is picked. Checked 2026-11-13: Chromium 140 yes, Firefox 141 no.:has() Works in this browser.Not in this browser: Without :has() it can’t work; the page says so instead of half-working. Checked 2026-11-13: Chromium 140 yes, Firefox 141 yes.