HTML and CSS is getting crazy
Thanks to "Declarative Shadow Root" we can now create shadow roots without JS.
And Thanks to CSS
@scope we can scope CSS into an element.Shadow Root isolating styles (with some exceptions like
color, font and etc..) also has its own use cases. For example you mostly design your site with layouts like an app. And probably have CSS defaults that helps you build layouts. But for an article or blog post, you might want different defaults, like instead of making margin: 0 on everything, you might wanna use default margins, and you might want default font-sizes for the headings, and default look for the <ul> or <ol> and etc... So you can just create a Shadow Root in those cases. Being able to create an isolated space with its own defaults without any conflicts is great.