Open Bug 1955202 Opened 1 year ago Updated 8 months ago

Check that ::details-content::(before|after) rules are displayed

Categories

(DevTools :: Inspector: Rules, task, P3)

task

Tracking

(Not tracked)

People

(Reporter: nchevobbe, Unassigned)

References

(Blocks 1 open bug, )

Details

On data:text/html,<meta charset=utf8><!DOCTYPE html><style>details::details-content::after { content: "::details-content::after"; }</style><details open><summary>Example summary</summary><p>Hello</p></details> , we should be able to see the ::after rule.

Depends on: 1955628
Depends on: 1954142
No longer depends on: 1955628

Note that there's no straightforward way to do this at the moment.
We don't display a ::details-content "node" in the markup view, so we can't "automatically" retrieve its pseudo-elements directly.
We could try to do something custom, and display both ::details-content and ::details-content::after when <details> is selected. That means we'd have to also handle any "child" of the after/pseudo element, like ::details-content::after::marker (and this could be a can of worm in the future)

A cleaner solution could be to actually display the ::details-content node / shadow DOM

▼ <details>
|   <summary>Summary</summary>
| ▼ ::details-content
| |   <p>Hello</p>
| | ▼ ::after
| | | ::marker

but does it makes sense to always display the ::details-content node, even if there's no style for it? Could it look odd to users who might not expect it to be visible?

URL: data:text/html,<meta charset=utf8><!D...
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.