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.



[1] <
[2] <http://dev.w3.org/csswg/selectors4/#scope-pseudo>

Received on Friday, 1 February 2013 03:10:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:58 UTC