Comments on: HTML Web Components Make Progressive Enhancement and CSS Encapsulation Easier! https://css-tricks.com/html-web-components-make-progressive-enhancement-and-css-encapsulation-easier/ Tips, Tricks, and Techniques on using Cascading Style Sheets. Mon, 05 Aug 2024 14:21:48 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: Kev Bonett https://css-tricks.com/html-web-components-make-progressive-enhancement-and-css-encapsulation-easier/#comment-1864806 Mon, 05 Aug 2024 14:21:48 +0000 https://css-tricks.com/?p=379335#comment-1864806 In reply to Derik Badman.

Thanks for the warning… but I do already code defensively so that I exit if the children don’t exist:

https://github.com/basher/Web-UI-Boilerplate/blob/master/ui/src/javascript/web-components/webui-disclosure.ts#L15

https://github.com/basher/Web-UI-Boilerplate/blob/master/ui/src/javascript/web-components/webui-tabs.ts#L13

Remember, too, that the examples in this article (well, 2 of them) are HTML Web Components, so the HTML is not being programatically generated.

]]>
By: Derik Badman https://css-tricks.com/html-web-components-make-progressive-enhancement-and-css-encapsulation-easier/#comment-1860920 Sat, 03 Aug 2024 11:21:22 +0000 https://css-tricks.com/?p=379335#comment-1860920 Be careful putting so much in the constructor, you’ll end up with a lot of errors if you programmatically create that web component. Those children may not be there to query.

]]>
By: Frank Awunor https://css-tricks.com/html-web-components-make-progressive-enhancement-and-css-encapsulation-easier/#comment-1859333 Fri, 02 Aug 2024 05:33:01 +0000 https://css-tricks.com/?p=379335#comment-1859333 l want to learn more from you keep the great work going

]]>