<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>18444</bug_id>
          
          <creation_ts>2012-07-31 07:04:35 +0000</creation_ts>
          <short_desc>[Shadow]: @host @-rules vs rules in document tree</short_desc>
          <delta_ts>2012-08-06 02:23:59 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Component Model</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>16009</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Takashi Sakamoto">tasak</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>71696</commentid>
    <comment_count>0</comment_count>
    <who name="Takashi Sakamoto">tasak</who>
    <bug_when>2012-07-31 07:04:35 +0000</bug_when>
    <thetext>I would like to confirm what specificity @host @-rules have.  For example,

&lt;head&gt;
&lt;style&gt; host { color: red; } &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;host&quot;&gt;&lt;span&gt;distributed node&lt;/span&gt;&lt;/div&gt;
&lt;/body&gt;

and 

var shadowRoot = new WebKitShadowRoot(document.getElementById(&quot;host&quot;));
shadowRoot.innerHTML = &quot;&lt;style&gt;@host { color: blue; }&lt;/style&gt;&lt;shadow&gt;&lt;/shadow&gt;&quot;;

What color will be applied to the host?
If we use class rules instead, what color will be applied to the host? i.e.

&lt;style&gt; .hostClass { color: red; } &lt;/style&gt;
&lt;div id=&quot;host&quot; class=&quot;hostClass&quot;&gt;&lt;span&gt;distributed node&lt;/span&gt;&lt;/div&gt;

Currently I&apos;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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71700</commentid>
    <comment_count>1</comment_count>
    <who name="Takashi Sakamoto">tasak</who>
    <bug_when>2012-07-31 08:57:45 +0000</bug_when>
    <thetext>I&apos;m sorry. I found a mistake. I mean,

&lt;style&gt; #host { color: read; } &lt;/style&gt;

Best regards,
Takashi Sakamoto</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71701</commentid>
    <comment_count>2</comment_count>
    <who name="Takashi Sakamoto">tasak</who>
    <bug_when>2012-07-31 08:58:47 +0000</bug_when>
    <thetext>I&apos;m sorry. &quot;read&quot; is typo.

&lt;style&gt; #host { color: red; } &lt;/style&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71835</commentid>
    <comment_count>3</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-08-03 23:20:58 +0000</bug_when>
    <thetext>http://dvcs.w3.org/hg/webcomponents/rev/5b8b6007c651</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71846</commentid>
    <comment_count>4</comment_count>
    <who name="Takashi Sakamoto">tasak</who>
    <bug_when>2012-08-06 02:23:59 +0000</bug_when>
    <thetext>Thank you for updating the spec.

Best regards,
Takashi Sakamoto</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>