w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.45k stars 657 forks source link

[css-shadow-parts-1] vendor prefixed pseudo elements support #4530

Open liamdebeasi opened 4 years ago

liamdebeasi commented 4 years ago

As per the spec, the ::part() pseudo-element can take additional pseudo-elements after it such as ::before (source: https://drafts.csswg.org/css-shadow-parts/#part).

Does this extend to vendor-prefixed pseudo-elements as well? The current behavior in Chrome and the latest Safari Tech Preview (96 as of writing) is that prefixed pseudo elements do not work with shadow parts.

Example: https://codepen.io/liamdebeasi/pen/jOOpQKa

I'm wondering if this is just a browser bug, or maybe a part of the spec that just needs clarification. Thanks!

Offroaders123 commented 3 years ago

I recently ran into this issue too, and I was wondering if we know whether support for it will be added at some point? Thanks!

tabatkins commented 3 years ago

Undefined, basically by definition - they're vendor-prefixed because they're not standardized, so the CSSWG doesn't define how they act. This should be raised against the browser vendor to decide.

I can see arguments either way, fwiw:

Overall, I suspect the morally correct answer is to lean towards not exposing them, but I suspect the practically correct answer is to expose them.