Accordingly to sources Shadow DOM should not let external styles in. However, either I do not understand it correctly, either I have made sth. wrong or it does. Please have a look here
https://kiszuriwalilibori-about-me.netlify.app/
Just inspect my name. The span inside heritages( what can be verified checking/unchecking color). The code that creates this element is
customElements.define('author-name', class extends HTMLElement {
constructor() {
super()
.attachShadow({ mode: 'open' })
.innerHTML = `
<style>
span{
font-family: "Oxygen", sans-serif;
font-size: calc(16px + 32 * ((100vw - 320px) / 1080));
color: #FB6542;
}
@media (max-width: 700px) {span {font-size:3rem;}}
@media (max-width: 508px) {span {font-size:2rem;}}
</style>
<span>Piotr Maksymiuk</span>`;
}
});
<author-name></author-name>
So, do I not understand or the code is invalid?