justinribeiro / lite-youtube

The fastest little YouTube web component on this side of the internet. The shadow dom web component version of Paul's lite-youtube-embed.
https://www.npmjs.com/package/@justinribeiro/lite-youtube
MIT License
836 stars 63 forks source link

Add shadow DOM ::part support #100

Closed cshawaus closed 7 months ago

cshawaus commented 9 months ago

By default, there is no way to customise elements within a shadow DOM since they fall into their own context. The ::part pseudo-element allows external CSS to access to the shadow tree and add such customisations without the need to use JavaScript.

See the following link for further details. https://developer.mozilla.org/en-US/docs/Web/CSS/::part