У меня есть разделы стилей, добавляемые в подклассы.
Очень упрощенная версия:
class MyComponent extends HTMLElement{
constructor(){
super()
this.html = `
<style>
:host {
/* some css in here */
}
</style>
<style>
:host {
/* additional css in here */
}
</style>`
}
//...
}
Кажется, что второй раздел стилей игнорируется.
Должен эта работа в порядке?
Обновление: работает, если раздел стилей не разделен
class MyComponent extends HTMLElement{
constructor(){
super()
this.html = `
<style>
:host {
/* some css in here */
/* additional css in here */
}
</style>`
}
//...
}