Created
December 22, 2014 21:12
-
-
Save bkardell/705137f838a959f01d45 to your computer and use it in GitHub Desktop.
shadow and style
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Gist for discussing https://twitter.com/ryosukeniwa/status/547131291527704576 thread in a better format... | |
My perspective: | |
Shadow root can be created on any element, regardless of whether it is a custom element... | |
This creates a piercable membrane which allows the CSS for the page to not worry about the stuff inside the shadow root, until it wants to. | |
This allows the stuff inside to work within the page and let certain safe things through, when it wants to. | |
Style element can use @import to share stylesheet information across many instances. | |
The design allows numerous means of possible 'import' optimizations, but locks you into none (in theory) | |
This allows DOM inside and outside the shadow root to answer selector matching the same way as CSS. | |
Please explain what is broken about these particular aspects of shadow dom? Something? | |
--> | |
<section> | |
#shadow-root | |
<style>...</style> | |
<div>...</div> | |
</section> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment