Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declarative CSS Modules and Declarative Shadow DOM adoptedstylesheets attribute #407

Open
KurtCattiSchmidt opened this issue Oct 1, 2024 · 0 comments
Labels
from: Microsoft Proposed, edited, or co-edited by Microsoft. topic: css Spec relates to CSS (Cascading Style Sheets) topic: dom Spec relates to DOM (Document Object Model) topic: html Spec relates to HTML (Hypertext Markup Language) topic: web components venue: WHATWG HTML Workstream

Comments

@KurtCattiSchmidt
Copy link

WebKittens

No response

Title of the proposal

Declarative CSS Modules and Declarative Shadow DOM adoptedstylesheets attribute

URL to the spec

https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/ShadowDOM/explainer.md

URL to the spec's repository

No response

Issue Tracker URL

No response

Explainer URL

https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/ShadowDOM/explainer.md

TAG Design Review URL

TODO

Mozilla standards-positions issue URL

mozilla/standards-positions#1081

WebKit Bugzilla URL

No response

Radar URL

No response

Description

When developing web components, web authors often encounter challenges with distributing global styles into shadow roots and sharing styles across different shadow roots. Declarative shadow DOM (DSD) enables creation of shadow DOM without JS, but adding styles to DSD requires the developer to either use JS to put a shared stylesheet into adoptedStyleSheets, or to duplicate the styles in a <style> element for each component instance.

We propose an enhancement to CSS module scripts that would allow developers to create CSS module scripts declaratively without a network request, and apply them to DSDs without the use of JS.

@nt1m nt1m added topic: css Spec relates to CSS (Cascading Style Sheets) topic: dom Spec relates to DOM (Document Object Model) from: Microsoft Proposed, edited, or co-edited by Microsoft. labels Nov 2, 2024
@annevk annevk added topic: html Spec relates to HTML (Hypertext Markup Language) topic: web components venue: WHATWG HTML Workstream labels Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from: Microsoft Proposed, edited, or co-edited by Microsoft. topic: css Spec relates to CSS (Cascading Style Sheets) topic: dom Spec relates to DOM (Document Object Model) topic: html Spec relates to HTML (Hypertext Markup Language) topic: web components venue: WHATWG HTML Workstream
Projects
None yet
Development

No branches or pull requests

3 participants