Add support for ::details-content::before|::after
Categories
(Core :: DOM: Core & HTML, enhancement)
Tracking
()
People
(Reporter: nchevobbe, Unassigned)
References
Details
Adding pseudo elements to element-backed pseudo elements should work, e.g.
details::details-content::after {
content: "In ::details-content::after";
}
https://drafts.csswg.org/css-pseudo-4/#element-like:
All pseudo-classes and pseudo-elements are syntactically allowed after an element-backed pseudo-element (such as x-button::part(label):hover or x-button::part(label)::before), just as if the pseudo-element were a type selector; but some are disallowed from matching:
- The structural pseudo-classes, :has() pseudo-class, :scope pseudo-class, and :host/:host()/:host-context() pseudo-classes never match.
- ::part() never matches. (Other element-backed pseudo-elements can, however.)
FWIW, on Chrome, navigating to 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>
, I do see the after pseudo element being rendered.
cc'ing Emilio and Luke to check this is not covered by another bug
Updated•7 months ago
|
Updated•6 months ago
|
Comment 2•6 months ago
|
||
Hey, the parsing aspect of this is addressed we just need to update the selector matching to accommodate it which I've marked this bug as a duplicate of.
Reporter | ||
Comment 3•6 months ago
|
||
(In reply to Luke Warlow from comment #2)
Hey, the parsing aspect of this is addressed we just need to update the selector matching to accommodate it which I've marked this bug as a duplicate of.
perfect, thanks!
Description
•