CSSOM: ignore title attributes on style elements in shadow trees #391
|
What's the point of doing this change? I'd rather not diverge the behavior of various elements inside shadow DOM as much as possible. |
|
If you have:
and From 7.1: "At the same time, it is an encapsulation abstraction, so it has to avoid affecting the document tree." Is there something in the spec already that would cover this case? |
|
Setting the preferred stylesheet set is defined in https://drafts.csswg.org/cssom/#add-a-css-style-sheet which talks about "document CSS style sheets" which are the ones reflected in document.styleSheets, which shadow dom style elements are not part of. Perhaps that's enough evidence that shadow dom style title should not set the preferred set, at least? |
|
Yeah, although the spec should not mention it clearly, we should honor an encapsulation here. This should be one of the instances which we should use the label |
|
FWIW, the Blink issue is https://crbug.com/588718 which is now fixed. |
|
This should really be fixed in the CSSOM specification I think once we have the terminology in place. Paging @zcorpan. |
|
It's specified in the CSSOM spec, and as I wrote earlier, you can sort of deduce that this shouldn't apply to shadow dom stylesheets, but I don't think it was written with shadow dom in mind. |
|
Yeah, let me have another section for clarification, mentioning misc. such as |
|
CSSOM bug is https://www.w3.org/Bugs/Public/show_bug.cgi?id=29349 |
Style elements inside a shadow tree should not be able to set the preferred stylesheet set for the document. Also, style elements inside a shadow tree should still be applied if it has a title element not matching the preferred stylesheet set of the top document.
https://lists.w3.org/Archives/Public/public-webapps/2015OctDec/0223.html