- From: Emilio Cobos Álvarez via GitHub <sysbot+gh@w3.org>
- Date: Sun, 06 May 2018 15:36:51 +0000
- To: public-css-archive@w3.org
emilio has just created a new issue for https://github.com/w3c/csswg-drafts: == [cssom] [css-scoping] Stylesheet title and Shadow DOM == See the following test-case: ```html <!doctype html> <div id="host"></div> <script> host.attachShadow({ mode: "open" }).innerHTML = ` <style> div { color: purple; } </style> <style title="Foo"> div { color: green; } </style> <style title="Bar"> div { color: red } </style> <div>Which color am I? `; console.log(host.shadowRoot.styleSheets[0].title); console.log(host.shadowRoot.styleSheets[1].title); console.log(host.shadowRoot.styleSheets[2].title); </script> ``` For this very simple test-case: * Blink shows red (which means that they apply all the stylesheets). * WebKit shows green (do they apply the "preferred" sheet per subtree? Or they just tweak the global state?). * Gecko shows green because it tweaks the global state, but with patches of mine they'd turn purple. I guess I'll turn it red now, but worth considering this. Blink also doesn't set the stylesheet `title` property. @lilles is there any reasoning for that? Looks like a bug to me. cc @rniwa Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2646 using your GitHub account
Received on Sunday, 6 May 2018 15:37:05 UTC