Closed
Bug 1502617
Opened 6 years ago
Closed 6 years ago
CSS ::slotted(*) selector does not recognize psuedo-elements
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: git, Assigned: emilio)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0 Steps to reproduce: <!doctype html> <div id="host"> <div>div1</div> <div>div2</div> </div> <script> host.attachShadow({ mode: "open" }).innerHTML = ` <style> ::slotted(div)::before { content: '::before '; } </style> <slot></slot> `; </script> Actual results: Two lines are displayed: "div1" and "div2". Expected results: Two lines should be displayed: "::before div1" and "::before div2". The spec linked by MDN suggests that this should work and I've verified Chromium applies the ::slotted(div)::before rule. https://developer.mozilla.org/en-US/docs/Web/CSS/::slotted https://drafts.csswg.org/css-scoping/#slotted-pseudo
Updated•6 years ago
|
Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core
Assignee | ||
Comment 1•6 years ago
|
||
Yeah... It should only work with ::before and ::after though, at least for now, see https://github.com/w3c/csswg-drafts/issues/3150. This is easy enough to fix.
Assignee: nobody → emilio
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee | ||
Comment 2•6 years ago
|
||
See https://github.com/w3c/csswg-drafts/issues/3150 for the issue that would expand this to all pseudos.
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/mozilla-inbound/rev/b7ed6370bc7d Support ::before / ::after on ::slotted pseudos. r=heycam
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/13768 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Comment 6•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b7ed6370bc7d
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Upstream PR merged
Comment 8•5 years ago
|
||
this still doesn't work. ::slotted(div)::after and ::slotted(div)::before are ignored.
Comment 9•5 years ago
|
||
Whoops, just found out that v65 wasn't released yet. Guess I'll have to wait till the end of January.
Updated•5 years ago
|
QA Whiteboard: [good first verify]
You need to log in
before you can comment on or make changes to this bug.
Description
•