News for hackers. Stuff that matters.
Re:Enhance WASM: Back End Agnostic SSR for Web Components by danielvaughn on Thursday April 11, 2024 @02:50PM (#40005484)
I'd never thought of this but you're totally correct. The only way to encapsulate styles within a shadow dom is to create that style tag (or use the CSSOM to generate a CSSStyleSheet), but either way it's the same outcome. The styles themselves are copied to each individual instance. Yuck.
Re:Enhance WASM: Back End Agnostic SSR for Web Components by niutech on Friday April 12, 2024 @07:42PM (#40018784)
You can use the same <link rel="stylesheet" href="..."> in Shadow DOM, which is cached by web browser.