- From: [ Cassondra ] <notifications@github.com>
- Date: Fri, 05 Mar 2021 07:38:31 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 5 March 2021 15:38:44 UTC
I really like the idea of an opt-in approach to allowing styles to cascade. Personally, the encapsulation is a big part of why we wanted to use web components for our design components but I can understand why that's not always the aim. I like the idea of having at least 2 options: 1. Allow all CSS to penetrate the shadow DOM using an opt-in approach such as ``` this.attachShadow({ mode: 'open', styles: 'all' }); ``` 2. Allow only specific stylesheets to penetrate the shadow DOM: ``` this.attachShadow({ mode: 'open', styles: [stylesheetPointer] // array of pointers to specific stylesheets? }); ``` Having a separate property like `styles` that can accept a few different inputs gives us a lot of flexibility to add functionality as we go. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/909#issuecomment-791496926
Received on Friday, 5 March 2021 15:38:44 UTC