Closed Bug 1901037 Opened 1 year ago Closed 7 months ago

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

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
138 Branch
Tracking Status
firefox128 --- wontfix
firefox138 --- fixed

People

(Reporter: dbaron, Assigned: lwarlow)

References

(Blocks 3 open bugs)

Details

(Keywords: dev-doc-complete, parity-chrome, parity-safari)

User Story

web-feature: details-content

Attachments

(1 file, 3 obsolete files)

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
Duplicate of this bug: 1910226

This is a test-config-only change with no user impact.

We've got bug 1941406 filed to make this pref-flip for users, but for now we
might as well make the pref-flip for the tests so that we can get some test
coverage and get a more realistic picture of the test-failures that remain.

Assignee: nobody → dholbert
Status: NEW → ASSIGNED
See Also: → 1941406
Attachment #9459782 - Attachment is obsolete: true
Assignee: dholbert → nobody
Status: ASSIGNED → NEW

(In reply to David Baron :dbaron: (⌚️UTC-4, no longer working on Mozilla) from comment #0)

  • enable the preference implemented in bug 1856374 to allow changing display on the <details> element

I've just posted a patch on bug 1941406 to do that, BTW.

Blocks: 1941406
See Also: 1941406
Assignee: nobody → lwarlow
Status: NEW → ASSIGNED

No behavior change right now, but this will unblock D241100.

Depends on: 1953539

Comment on attachment 9471222 [details]
Bug 1901037 - Allow UA widget nodes to be pseudo-elements. r=#style

Revision D241106 was moved to bug 1953539. Setting attachment 9471222 [details] to obsolete.

Attachment #9471222 - Attachment is obsolete: true
Depends on: 1953557
Depends on: 1954140
Depends on: 1954142
Depends on: 1954145
Pushed by luke@warlow.dev: https://hg.mozilla.org/integration/autoland/rev/26b1240bfca3 Implement `::details-content` pseudo element r=emilio,devtools-reviewers,nchevobbe

Backed out for causing multiple rendering related wpt failures

Flags: needinfo?(lwarlow)

Waiting on Emilio's display: contents fix and then I'll rebase my change atop that should deal with most of the test oddities that I missed.

Flags: needinfo?(lwarlow)
Pushed by luke@warlow.dev: https://hg.mozilla.org/integration/autoland/rev/c6d9a112ceec Implement `::details-content` pseudo element r=emilio,devtools-reviewers,nchevobbe
Pushed by csabou@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f36f389877eb Remove subtest as it's passing after previous changes. a=test-only CLOSED TREE
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8207ffe01afa [devtools] Add test for ::details-content pseudo element in Rules view. r=devtools-reviewers,bomsy.
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch
Status: RESOLVED → REOPENED
Flags: needinfo?(lwarlow)
Resolution: FIXED → ---

Comment on attachment 9471713 [details]
Bug 1901037 - [devtools] Add test for ::details-content pseudo element in Rules view. r=#devtools.

Revision D241397 was moved to bug 1935067. Setting attachment 9471713 [details] to obsolete.

Attachment #9471713 - Attachment is obsolete: true

This landed, so let's close the bug, the devtools test was moved :)

Status: REOPENED → RESOLVED
Closed: 7 months ago7 months ago
Resolution: --- → FIXED

Related Pull Requests

No longer blocks: 1959597
Regressions: 1959597
Blocks: 1955190
User Story: (updated)
Depends on: 1981724
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: