Think about teams building/using these: when/where do they need to coordinate? How often?
-
-
Replying to @slightlylate @heydonworks
0/ I don't understand how they could be mucked with in a way that you can't do the same to a shadowDOM impl...
1 reply 0 retweets 0 likes -
1/ Something like this as an implementation detail in something like styled-components could make this a no-brainer...
1 reply 0 retweets 1 like -
/2 and since the vendor isn't creating and parsing a <style> element for every mounted instance of a component it should in theory be faster
1 reply 0 retweets 1 like -
/3 since a single <style> element is mounted per component.
1 reply 0 retweets 1 like -
Replying to @thysultan @heydonworks
Nope, browsers do magic about style sharing here; also, separate scoped resolver. Faster in multiple ways.
1 reply 0 retweets 0 likes -
Replying to @slightlylate @heydonworks
Did'nt mean the css parser, but the parse+DOM operations involved in `.innerHTML` parsing and creating a <style> element for each instance.
1 reply 0 retweets 0 likes -
Replying to @thysultan @heydonworks
That's not how most web components construct their DOM
1 reply 0 retweets 0 likes -
Replying to @slightlylate @heydonworks
Is there a way to append a single <style> that is shared between all instances instead than creating a <style> for every instance?
1 reply 0 retweets 0 likes -
...instead of* creating a <style> for every instance?
1 reply 0 retweets 0 likes
Yep! This was the note a out using cloneNode().
-
-
*about
1 reply 0 retweets 0 likes -
But again, the new <style> approach is cheaper than it looks because browsers are smart.
1 reply 0 retweets 0 likes - 7 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.