html icon indicating copy to clipboard operation
html copied to clipboard

Clarification for <link> behavior in Declarative Shadow DOM

Open bakura10 opened this issue 2 years ago • 5 comments

Hi :),

I'm playing with Declarative shadow dom and found that, if a stylesheet is loaded inside a declarative shadow DOM template, the rendering is blocked. Safari (that also implement declarative shadow DOM) however does not block rendering, which causes a FOUC.

I have been unable to find any note in the specification on which behavior is correct. It would be nice for the stylesheet to be blocking. For now, the only way to avoid the FOUC is to also load the stylesheet at the global scope, but the issue with this approach is that it leaks the style to the main document, which is indesirable.

Thanks.

bakura10 avatar Apr 19 '23 04:04 bakura10