Accordion
Exclusive open, animated height auto, correct semantics, find-in-page support. The browser does all of it.
details-contentinterpolate-size
How it works
<details name="acc-faq">makes the group exclusive — the browser closes the other panels.details-content:h-0→open:details-content:h-autoanimates the panel height. The trick that makesheight: autoanimatable is[interpolate-size:allow-keywords]on the wrapper — it’s an inherited property, so one wrapper class covers every panel and the snippet is fully self-contained (nothing to add to your CSS config).details-content:transition-discrete(transition-behavior: allow-discrete) keeps the content painted (content-visibility) while it collapses, so the close animation is visible too.- The chevron is a
after:pseudo-element rotated withgroup-open:.
Accessibility
<details>/<summary> ship keyboard support and disclosure semantics natively, and unlike
display: none accordions, collapsed content is still searchable with find-in-page in
Chromium (content-visibility: hidden keeps it in the DOM).
Browser support
Minimum stable version per engine, resolved at build time from MDN's browser-compat-data; Baseline status from the official web-features dataset. Everything degrades gracefully — the “when missing” column is the actual behavior, not a broken page.
| Feature | Chrome | Edge | Firefox | Safari | When missing |
|---|---|---|---|---|---|
| Exclusive accordions (<details name>)‡Baseline 2024 · newly available | 120 | 120 | 130 | 17.2 | All panels can be open at the same time — still fully functional. |
| ::details-content pseudo-elementBaseline 2025 · newly available | 131 | 131 | 143 | 18.4 | Panels open and close instantly, without the height animation. |
| interpolate-size: allow-keywordsLimited availability | 129 | 129 | ✕ | ✕ | height: auto cannot be interpolated, so content snaps open instead of easing. |
‡ HTML feature — @supports can only test CSS, and we ship no JS to detect it, so it gets no live badge.