::details-content
Newly availableSince 202590% of users
A pseudo-element that targets the content part of a <details> element (the part that expands and collapses), so you can style or animate it.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since September 2025. Widely available around March 2028.
See how modern your own CSS is.Check your CSS →
Quick example
details::details-content {
/* Styles the expandable content area directly */
padding: 10px;
background-color: #f9fafb;
border: 1px solid #e5e7eb;
}::details-content browser support
BaselineNewly availableSince 2025 this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.Works in all modern browsers. May need a fallback for older browsers.
Usage90%of people can use this10% use a browser without it.
Browsers
131+
143+
18.4+
131+Mobile
131+Android
143+Android
18.4+iOS