Exhibit 22 of 23

Entrances and exits

Open the doors. The notice slides down into place, and slides away again when it closes. Opening is HTML; both movements are CSS transitions.

The exhibit

Then close it with its button, Esc, or a click outside, and watch it leave.

The Neon Void

Doors are open

DJ Sloppy Droppy is on the decks. The bubbles are coming up past the gallery. Mind the steps.

How it works

A transition needs a value to start from, and an element that was display: none hasn’t got one, so it would just appear. @starting-style gives it one: the notice’s first frame open is 40 px up and transparent, and the transition carries it to where it sits.

Closing has the opposite problem: display would flip to none at once and take the notice with it. transition-behavior: allow-discrete on display and overlay holds both until the fade has finished, so it can leave as nicely as it came. The popover itself, its Esc key and its click outside are the browser’s.

The key CSS

Cut from this exhibit’s stylesheet as it is served.

/* open: where it sits. Closed: where it goes. The transition runs between them */
.x-arrive .notice { opacity: 1; translate: 0 0; }
.x-arrive .notice:not(:popover-open) { opacity: 0; translate: 0 40px; }
.x-arrive .notice::backdrop { background: rgb(23 24 21 / .5); }

@media (prefers-reduced-motion: no-preference) {
  .x-arrive .notice, .x-arrive .notice::backdrop {
    transition: opacity .3s, translate .3s, display .3s allow-discrete, overlay .3s allow-discrete;
  }
  /* the frame it opens on: without this it would appear already in place, because it was display: none */
  @starting-style {
    .x-arrive .notice:popover-open { opacity: 0; translate: 0 -40px; }
    .x-arrive .notice:popover-open::backdrop { opacity: 0; }
  }
}

Accessibility

As good as a popover: a real button opens it, Esc closes it, focus goes back to the button, and it is announced. Like every popover it isn’t modal, so the page behind can still be reached by Tab. Under reduced motion there is no slide; it simply opens and closes.

Browser support

  • popover Works in this browser.Not in this browser: The :target version below works everywhere. Checked 2026-11-13: Chromium 140 yes, Firefox 141 yes.
  • @starting-style CSS can’t test for this one. Without it: The notice opens and closes at once, with no slide. Checked 2026-11-13: Chromium 140 yes, Firefox 141 yes.
Slop at the top