coderef

::details-contentBaseline · Newly available

The ::details-content pseudo-element selects the expandable content of a <details> element, excluding the <summary>.

Works in the latest version of every major browser, but older devices may not support it yet. Baseline since Sep 16, 2025.

Browser support

DesktopChrome
1–130Not supported
131+Supportedsince Nov 12, 2024
Current: 155
Edge
12–130Not supported
131+Supportedsince Nov 14, 2024
Current: 154
Firefox
1–142Not supported
143+Supportedsince Sep 16, 2025
Current: 157
Safari
1–18.3Not supported
18.4+Supportedsince Mar 31, 2025
Current: 27
MobileChrome Android
18–130Not supported
131+Supportedsince Nov 12, 2024
Current: 155
Firefox Android
4–142Not supported
143+Supportedsince Sep 16, 2025
Current: 157
Safari iOS
1–18.3Not supported
18.4+Supportedsince Mar 31, 2025
Current: 27

How to use

Every current browser supports this, but it only became Baseline on Sep 16, 2025. Use it as a progressive enhancement, or keep a fallback if you support older devices.

Example

Full syntax and examples are on MDN: ::details-content.

Feature detection

CSS · check before using
@supports selector(:details-content) {
  /* styles that use :details-content */
}

/* or in JavaScript */
if (CSS.supports("selector(:details-content)")) {
  // use it
}