- From: <bugzilla@jessica.w3.org>
- Date: Tue, 31 Jul 2012 07:04:35 +0000
- To: public-webapps-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=18444 Summary: [Shadow]: @host @-rules vs rules in document tree Product: WebAppsWG Version: unspecified Platform: PC OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Component Model AssignedTo: dglazkov@chromium.org ReportedBy: tasak@google.com QAContact: public-webapps-bugzilla@w3.org Blocks: 14978 I would like to confirm what specificity @host @-rules have. For example, <head> <style> host { color: red; } </style> </head> <body> <div id="host"><span>distributed node</span></div> </body> and var shadowRoot = new WebKitShadowRoot(document.getElementById("host")); shadowRoot.innerHTML = "<style>@host { color: blue; }</style><shadow></shadow>"; What color will be applied to the host? If we use class rules instead, what color will be applied to the host? i.e. <style> .hostClass { color: red; } </style> <div id="host" class="hostClass"><span>distributed node</span></div> Currently I'm thinking of the following way: (1) If there exists any inline style, apply. Skip (2) and (3). (2) If there exists any @host @-rule, apply. Skip (3). (3) If there exists any rules (id rules, class rules and so on) declared in some style element in document tree, apply. Is this correct? -- Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
Received on Tuesday, 31 July 2012 07:04:41 UTC