- From: Mark Kennedy <notifications@github.com>
- Date: Sun, 20 Dec 2020 14:41:22 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Sunday, 20 December 2020 22:41:35 UTC
You don't need a library to scope your css to a custom element. Given the following HTML ```html <styled-form> <form> <label> <select name="nums"> <option value="1">One</option> <option value="2">Two</option> </select> </label> <label> <input type="text" name="first"> </label> </form> </styled-form> ``` You can simply use the `styled-form` css selector to style everything in this web component: ```css styled-form label {} styled-form input {} ``` My point was wrapping every nested element in a custom element just to apply styles seems unnecessary. Sure we can make everything nested there into its own custom element with a bunch of JS but to @dannymcgee 's [point above](https://github.com/WICG/webcomponents/issues/509#issuecomment-745610832), your setup becomes soooo complicated without any reason. -- 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/509#issuecomment-748681277
Received on Sunday, 20 December 2020 22:41:35 UTC