|
|
|
|
|
by captain_crabs
2949 days ago
|
|
See shadow dom section in here: https://github.com/w3c/webcomponents/ which specified most of docs are maintained in here: https://dom.spec.whatwg.org/ And as for what it is, you know how a given web page has global css/query selector scope? Shadow dom is like a membrane in there, where styles and other things don't go in (unless you explicitly poke a hole). It's like a whole new document that you can nest inside an existing document. It's encapsulation inside browsers |
|
It sounds like a powerful way to make reusable components where some css can't be overridden because it would break the component (eg. Layout, shape) while allowing other parts to be overridden (colour, size, font, etc.)