Open Bug 1901037 Opened 22 days ago Updated 21 days ago

Support ::details-content pseudo-element and improved styling of <details> element

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement

Tracking

()

Tracking Status
firefox128 --- affected

People

(Reporter: dbaron, Unassigned)

References

(Blocks 2 open bugs)

Details

(Keywords: dev-doc-needed)

whatwg/html#10265 specifies the rendering of the <details> element in more detail than it was previously specified. Many of these changes already match what is implemented in Gecko. I think I'm aware of three things that would need to change to match them:

  • enable the preference implemented in bug 1856374 to allow changing display on the <details> element
  • implement the ::details-content pseudo-element and make it match the correct element. (There may be some work here to implement the "part-like pseudo-element" concept.)
  • Change the default display of the internal <slot> matched by the ::details-content pseudo-element to block rather than contents. (This is the one part here that involves compatibility risk.)

There's also one additional case where Gecko doesn't match an earlier change (whatwg/html#6466) to the HTML spec (see bug 1724299):

  • the styling that makes the <details> open and close (which is currently in details.css) should use content-visibility rather than display.
Blocks: css-pseudo-4
Keywords: dev-doc-needed
Summary: support ::details-content pseudo-class and improved styling of <details> element → Support ::details-content pseudo-element and improved styling of <details> element
You need to log in before you can comment on or make changes to this bug.