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
Just a question about the roadmap. Are there plans to support constructable stylesheets with Shadow DOM? When using native Custom Elements the styles are repeated for multiple instances of the same element, and constructable stylesheets are a nice solution.
The text was updated successfully, but these errors were encountered:
Yes, I think so, once they're supported by all browsers. Though until CSS Modules are also supported, I'm not sure they have that much benefit — you still have to transport styles in JavaScript strings (unless you fetch them, leading to FOUC) and <style> tags in shadow DOM are already deduplicated, so the performance benefit is probably fairly modest.
@Rich-Harris I think they are now supported.
they could allow removing of style tag what puts dom node creations on a diet what is something we could all realy use with webcomponents anyway
Furthermore i think its implemented everywere by now and Lit also uses this.
it could realy benefit custom-element creation through svelte.
think the api could be like parts that of css that is not dynamic be created with Constructable Stylesheets and parts that change dynamicly by injected in stylesheets since that wil make them local.
this would also make it render faster because styling is shared across the components when using Constructable Stylesheets and this will also remove flashing of content and reduce memory usage probably
Just a question about the roadmap. Are there plans to support constructable stylesheets with Shadow DOM? When using native Custom Elements the styles are repeated for multiple instances of the same element, and constructable stylesheets are a nice solution.
The text was updated successfully, but these errors were encountered: