Bug 1901037 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

[whatwg/html#10265](https://github.com/whatwg/html/pull/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](https://drafts.csswg.org/css-pseudo-4/#details-content-pseudo) 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](https://github.com/whatwg/html/pull/6466)) to the HTML spec (see bug 1724299):
* the styling that makes the `<details>` open and close (which is currently in [details.css](https://searchfox.org/mozilla-central/source/layout/style/res/details.css) should use `content-visibility` rather than `display`.
[whatwg/html#10265](https://github.com/whatwg/html/pull/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](https://drafts.csswg.org/css-pseudo-4/#details-content-pseudo) 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](https://github.com/whatwg/html/pull/6466)) to the HTML spec (see bug 1724299):
* the styling that makes the `<details>` open and close (which is currently in [details.css](https://searchfox.org/mozilla-central/source/layout/style/res/details.css)) should use `content-visibility` rather than `display`.

Back to Bug 1901037 Comment 0