polyfills icon indicating copy to clipboard operation
polyfills copied to clipboard

[ShadyCSS] Selectors for slot element does not work

Open tomalec opened this issue 7 years ago • 2 comments

Selectors like .foo .classy-slot::slotted(*) does not work.

Steps to reproduce

  1. Define custom element as Shadow DOM per element is not supported,

  2. Create Shadow Root.

  3. Add <slot> element with a class on it,

  4. Add <style> element that (according to the README)

    have a selector to the left of the ::slotted pseudo-element.

    Precisely have a selector for the slot element itself, like .foo slot.bar::slotted(*)

  5. Create an instance of this element (shadow host), add a child element inside.

Expected behavior

The selector should match child element, and apply rules to it.

Actualbehavior

The rules are not applied

Live example

https://jsbin.com/yayoyaw/edit?html,output

tomalec avatar Jan 31 '18 18:01 tomalec