There was a thing called "scoped css" back in 2012 that never went anywhere which seems similar. But I think Shadow DOM also mixes in some notion of DOM access protection iirc. Also interested in a description of what shadow dom is and what it can be used for.
https://developer.chrome.com/blog/a-new-experimental-feature...