Re: [w3c/webcomponents] Ignore title attributes on <link rel=stylesheet> in shadow trees (#535)

I spent some time learning about this and agree with @hayatoito and @rune-opera that we should ignore title attributes for stylesheet links inside a shadow tree. The reasoning is basically the same as was decided (before my time, in #391) for style elements. The title attribute has a global affect on the document, both in terms of adding to the list of named stylesheets and in terms of changing some defaults and preventing some other stylesheets from applying. It would be better to avoid this global affect from components that are supposed to be encapsulated.

I put together https://ns-jmzlbrrfkc.now.sh/ as a demo page for anyone else who would like help understanding how the title attribute works in combination with alternate. In Firefox you can switch between style sheets using the menu, View, Page Style.

I hope we can get consensus on this quickly (@smaug----, @travisleithead, @rniwa). It might be a bit tricky to spec rigorously until we first straighten out https://github.com/whatwg/html/issues/848, but if everyone is agreed we can record consensus here or maybe just with a non-rigorous line in the shadow DOM spec.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/535#issuecomment-236770903

Received on Tuesday, 2 August 2016 03:21:38 UTC