Skip to content

[Declarative Shadow DOM Style Sharing] Suggestions for improving problem statement #889

Open
@sorvell

Description

The main issues with using <style> in declarative Shadow DOM (DSD) are:

  1. It's not equivalent to adopting a stylesheet since the sheet is not shared between different shadowRoots. A shared sheet can be modified and any shadowRoots in which it's adopted are automatically updated. There is currently no way to do this with DSD
  2. Identical styling must be re-emitted as HTML as many times as it's used. This bloats the HTML size of the document. Some of the cost can be easily mitigated via compression and also since browsers likely optimize actual creation of stylesheets. However, the strings must be decompressed and parsed and this adds needless extra work.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions