This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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?
I'm sorry. I found a mistake. I mean, <style> #host { color: read; } </style> Best regards, Takashi Sakamoto
I'm sorry. "read" is typo. <style> #host { color: red; } </style>
http://dvcs.w3.org/hg/webcomponents/rev/5b8b6007c651
Thank you for updating the spec. Best regards, Takashi Sakamoto