You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Svelte always uses Shadow DOM for custom elements. This has the effect of blocking application level CSS, as well as other effects. Many developers building custom elements with other tools have found that they don't always want this behavior; that sometimes it is more useful to not use Shadow DOM. And indeed, many tools for building custom elements make Shadow DOM optional.
For example, Stencil has a switch for this, which defaults to "off".
(Feature request)
Currently, Svelte always uses Shadow DOM for custom elements. This has the effect of blocking application level CSS, as well as other effects. Many developers building custom elements with other tools have found that they don't always want this behavior; that sometimes it is more useful to not use Shadow DOM. And indeed, many tools for building custom elements make Shadow DOM optional.
For example, Stencil has a switch for this, which defaults to "off".
https://stenciljs.com/docs/styling
Polymer's
lit-element
uses Shadow DOM by default, but provides a hook_createRoot()
to turn it off with a line of code as needed.https://github.com/Polymer/lit-element
hyperHTML-Element appears to default to shadow DOM, but can be turned off easily.
https://viperhtml.js.org/hyperhtml/documentation/#components-2
SkateJS supports both Shadow DOM and light DOM.
http://skatejs.netlify.com/
Based on all this, and to improve the broad usability of Svelte custom elements, a Svelte feature request: make Shadow DOM optional.
The text was updated successfully, but these errors were encountered: