Intent to prototype and ship: improvements to <details> styling, including support for ::details-content pseudo element

158 views
Skip to first unread message

Daniel Holbert

unread,
Aug 19, 2025, 12:52:15 AMAug 19
to dev-pl...@mozilla.org
[sorry, sending a bit belatedly]

Last Monday 8/11, I turned on support for some improvements to the styling of <details> elements, including the ::details-content pseudo-element, in the next day's Firefox Nightly 143. These changes are configured to ride the trains to release, as part of the Firefox 143 release in mid-September.  Other browsers have previously shipped support for this set of improvements (as noted below).

Thanks to Luke Warlow of Igalia for taking on this feature, and to Keith Cirkel for his help with some final bits, and also to Emilio Cobos Álvarez for some supporting work!


I didn't find an intent-to-prototype (in part because this was a small feature, following spec changes to evolve an existing feature); so I'm adding the info below that would've been in an intent-to-prototype.

Summary: The ::details-content pseudo-element targets the additional information in a <details> element that can be expanded or collapsed (as distinguished from the <summary> child element). Previously there was no such element, so any child/children would have to be styled individually.  Additionally: the <details> element itself used to be forced to `display:block`, but now we'll allow its `display` property to be set to any value, per the updated spec.

Bugs:
  Implemented in https://bugzilla.mozilla.org/show_bug.cgi?id=1901037 (and dependencies)
Specification:
Standards Body: CSSWG, WHATWG
Platform coverage: All
Preferences:
  'layout.css.details-content.enabled' (set to "true" for the new behavior)
  'layout.details.force-block-layout' (set to "false" for the new behavior)
Link to standards-positions discussion: https://github.com/mozilla/standards-positions/issues/1027
Other Browsers:
* Blink: Shipped since v131
* WebKit: Shipped since v18.4
(based on MDN compat data )


Nicolas Chevobbe

unread,
Aug 19, 2025, 1:19:40 AMAug 19
to dev-pl...@mozilla.org, Daniel Holbert
Thanks Daniel. Note that we have a META bug for DevTools support: https://bugzilla.mozilla.org/show_bug.cgi?id=1955190 

Daniel Holbert

unread,
Aug 19, 2025, 4:28:06 AMAug 19
to Nicolas Chevobbe, dev-pl...@mozilla.org
Thanks, Nicolas!  I missed that we already had that metabug (and that we've already added some devtools support).
Reply all
Reply to author
Forward
0 new messages