- From: Lukas Oppermann <notifications@github.com>
- Date: Sun, 23 Oct 2016 04:18:41 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
Received on Sunday, 23 October 2016 11:19:32 UTC
Hey @rniwa,
sure, I will try, my desired setup is like this.
```html
<my-element>
<slot></slot>
</my-element>
```
Than I want to insert the following into the slot (needs to be in lightdom, due to the form picking it up):
```html
<label>
<input type="checkbox" />
<div class="material-toggle__switch">
<div class="material-toggle__knob" draggable="true"></div>
</div>
<div class="material-toggle__label">Custom Label</div>
</label>
```
Now I want to be able to do stuff like this within the custom elements `<style>`:
```css
::slotted(input[checked] ~ .material-toggle__switch){
/* style the .material-toggle__switch when the checkbox is checked */
}
```
Does this make sense to you? Do you need any more explanation/info?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/594#issuecomment-255582957
Received on Sunday, 23 October 2016 11:19:32 UTC