Shadow DOM creates a strongly isolated DOM subtree for web components. The outer page cannot style its contents directly; the component must provide its own styles through HTML and JavaScript. section 9.3.2
Choose Shadow DOM when a component must remain visually self-contained:
- Package a reusable widget whose appearance must remain identical across multiple websites. section 9.3.2
- Prefer Shadow DOM over CSS scope when strong separation from the page cascade matters; use scope when the page should influence module styling. section 9.3.2
Embedded social-media widget
A widget embedded in a blog can use Shadow DOM to keep its structure and styles independent from the host page, preventing the page stylesheet from styling it directly. section 9.3.2

