I'd gather that interactions with and implementation through Shadow DOM is going to be (even) more complex than this html element based scoping (although I admit I don't know how Stylo works, internally).
This is not true. ShadowRoots have a few nice properties which
<style scoped> doesn't, which we rely on:
- A shadow root cannot stop being a shadow root dynamically or vice versa. And the fact that an element is a shadow host only affects descendants, not siblings.
- Elements inside a Shadow Root only receive rules from one containing shadow root, not arbitrarily many.
That is not to say that
<style scoped> couldn't be implemented efficiently, but there's some complexity associated with it.
but in the meantime, things could be adopted the way they were pre-stylo; that certainly worked in practice.
The way styling works pre-and-post stylo is completely different. The way those interact... Sure, we could certainly make them work the same way the work with Shadow DOM today.
Implementation-wise, by the time we did stylo we didn't have all the Shadow DOM stuff, so at least some stuff could be borrowed from that. Still it would be pretty much a complete re-implementation of
If you are considering this, then please indicate your support for/interest in the proposal in the WhatWG issue linked above so they are aware of your implementer interest.
I don't think that's my call to make. The official way to get an official Mozilla position on a standards topic is filing an issue in https://github.com/mozilla/standards-positions. I can certainly provide feedback, but probably I'm not the only one who should.