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

Add CSS property #14

Closed
ByteEater-pl opened this issue Dec 23, 2021 · 1 comment
Closed

Add CSS property #14

ByteEater-pl opened this issue Dec 23, 2021 · 1 comment

Comments

@ByteEater-pl
Copy link

Per the separation of concerns principle, the markup should only specify semantics. Polluting it with template children when the purpose is purely stylistic goes very much against it, is inelegant, verbose, and hurts readability. And, as the blog post mentions, suffers from lack of reusability. It would be better to be able to define templates out of band (e.g. inside head or in a different resource altogether) and reference them using CSS. I.e. bring back the binding property from XBL. And events for attaching and detaching, for situations in which the author wishes to go beyond declarativity and resort to scripting.

@mfreed7
Copy link
Owner

mfreed7 commented Dec 29, 2021

Thanks for the comment. Remember that the purpose of declarative shadow dom is to allow shadow trees of all kinds to be represented in HTML, not just the ones used for “purely stylistic” reasons. For example when serializing custom elements that use shadow dom. I’m not sure re-structuring the DOM tree via CSS is a great idea - are there any other such precedents?

@mfreed7 mfreed7 closed this as completed Dec 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants