W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2013

Using Shadow DOM @host rule with :scope pseudo-selector

From: Dominic Cooney <dominicc@google.com>
Date: Fri, 1 Feb 2013 12:10:27 +0900
Message-ID: <CAHnmYQ8r8eRA92huRGemYwUdZRg5gKqZiYMwRgvxzhe1MZKm2A@mail.gmail.com>
To: WebApps WG <public-webapps@w3.org>
I wanted clarification on the meaning of @host rules [1] in combination
with the :scope pseudo selector [2].

Am I correct in assuming that if I wanted to style the host element, and
only the host element, I could apply these features in combination this way?

@host {
  :scope {
    border: 1px solid orange;
  }
}

I think that is awesome.

It might be clearer whether these features combine in this way if the
Shadow DOM spec mentioned @host establishing the "contextual reference
element set" mentioned in the CSS 4 Selectors spec.

Regards,

Dominic

[1] <
https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#host-at-rule
>
[2] <http://dev.w3.org/csswg/selectors4/#scope-pseudo>



-- 
<http://goto.google.com/dc-email-sla>
Received on Friday, 1 February 2013 03:10:54 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:57 GMT