2 ms·
Includes are different than this. Pretend the template is site header, site nav, body content, and footer; each being a slot. The server then streams body conte
by megaman821 3y ago
Includes are different than this. Pretend the template is site header, site nav, body content, and footer; each being a slot. The server then streams body content, site header, site nav and footer in that order. Now more important content gets rendered first without any JS.
This technique would be a lot more usable though when shadow roots become open style-able. It is kinda funky having to apply your CSS separately to the layout regions that live in your shadow dom.
- niutech 3y agoYou can have a global stylesheet and @import it inside Shadow DOM or use ::part() from outside of it.