W3C home > Mailing lists > Public > www-style@w3.org > June 2014

Re: [css-scoping] Renaming :host and :host-context

From: Daniel Freedman <dfreedm@google.com>
Date: Sun, 8 Jun 2014 16:45:54 -0700
Message-ID: <CAAUAVAj5LAZYzihV2hkvpzPt2jizx92GVQ0Op4s8Y6pja34L_A@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-style@w3.org
I don't think this would be a positive change. :host refers to the host
element, not the shadow root itself. A rename to :shadow-root would be
conceptually incorrect.

The same argument applies to :host-context.

As a more practical point, :host is the only way to affect styling on the
host element independent of selector identity, and as such will be used by
developers in practically every root.

Making that name longer for the sake of "alignment" is a disservice to
developers.
Been reading through the ShadowDOM naming discussions, and it occurred
to me that, for the purpose of aligning the vocabulary more strongly,
it might be a good idea to rename :host to :shadow-root and :host-context
to :shadow-context.

This gives us some nice parallels:
  :shadow-root is like :root
  :shadow-context() is like :scope-context() (if we go with :scope-context)

and it also creates a closer tie among all the shadow-related pseudos,

  ::shadow
  :shadow-root
  :shadow-context
  ::light-content (or maybe ::shadow-projected as a third idea)

It reduces the author-exposed vocabulary, like dbaron wanted.

Anyway, just a thought. Gonna go back to reviewing the minutes...
~fantasai
Received on Sunday, 8 June 2014 23:46:21 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:22 UTC