webcomponents / webcomponents/polyfills

[ShadyCSS] Selectors for slot element does not work

Open
#22 2 comments 0 reactions 0 assignees View on GitHub
Package: shadycss Severity: Low Type: Feature wontfix
Dominant language
HTML
Stars
1.2k
Forks
168
PR merge metrics
No merged PRs in 30d

Description

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

## Steps to reproduce

0. Define custom element as Shadow DOM per element is not supported,
1. Create Shadow Root.
2. Add `` element with a class on it,
3. Add `` element that ([according to the README](https://github.com/webcomponents/shadycss#selector-scoping))
> 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(*)`

4. 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.