javascript - How to select :host with a class in css for web components? -


in new v1 web components specs, can use :host target custom element. attached class a custom element, , had css selector :host.a, styles not being applied. know how fix this?

thanks

as per documentation:

for example, had component shadow tree following:

<x-foo class="foo">     <"shadow tree">         <div class="foo">...</div>     </> </x-foo> 

for stylesheet within shadow tree:

  • ...
  • ':host(.foo)' matches <x-foo> element.

as op has commented, would, in case, translate to:

:host(.a) {     ... } 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -

What is happening when Matlab is starting a "parallel pool"? -