doesn’t adjust in height to fit its contents like you expect other elements to do. W3Schools is optimized for learning, testing, and training. Shadow DOM has own stylesheets. You can think of shadow DOM as a scoped subtree inside your element. Working with the Shadow DOM. Read more on Web Fundamentals. Numbers followed by -webkit- or -moz- specify the first version that worked with a prefix. The only existing solution that creates a boundary between the code you write and code that consumes, is ugly - and operates by using a bulky and restrictive iFrame, which brings with itself another set of problems. The higher the number, the more blurred the You can think of the shadow DOM as a “DOM within a DOM”. Shadow DOM was created to allow encapsulation and componentisation natively on the web platform without having to rely on tools like