- From: <bugzilla@jessica.w3.org>
- Date: Fri, 16 Aug 2013 02:03:18 +0000
- To: public-webapps-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=22980 Bug ID: 22980 Summary: [Shadow]: shadowRoot styles should not match the host element Classification: Unclassified Product: WebAppsWG Version: unspecified Hardware: PC OS: All Status: NEW Severity: normal Priority: P2 Component: Component Model Assignee: dglazkov@chromium.org Reporter: sorvell@chromium.org QA Contact: public-webapps-bugzilla@w3.org Blocks: 14978 Currently selectors in shadowRoot styles match the host element. This makes it relatively easy to write rules that have unexpected, undesired effects. Consider a shadowRoot like this: <style> #thing { background: red; } </style> <div id="thing">sr-div</div> The author has setup an id based style that should apply only within this shadowRoot. Now that shadowRoot is added to an element like this: <div id="#thing">host-div</div> Now both host-div and inside-div will be styled via #thing which is not what the shadowRoot author wanted or expects. To fix this, we can make the :host the only way to match the shadowRoot host element. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Friday, 16 August 2013 02:03:19 UTC