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

[cssom] serialization of type selectors with namespaces

From: L. David Baron <dbaron@dbaron.org>
Date: Sat, 8 Jun 2013 15:08:51 +0900
To: www-style@w3.org
Message-ID: <20130608060851.GA3634@crum.dbaron.org>
http://dev.w3.org/csswg/cssom/#serializing-selectors says:
  # 2. Otherwise, for each simple selector in the sequence of simple
  # selectors that is not a universal selector of which the
  # namespace prefix maps to the null namespace (not in a namespace)
  # or of which the namespace prefix maps to a namespace that is not
  # the default namespace serialize the simple selector and append
  # the result to s.

This isn't quite right, because it says to skip universal selectors
that are semantically relevant.  For example, given the style sheet:

  @namespace "http://www.w3.org/1999/xhtml";
  @namespace nons "";
  nons|*:hover { color: blue } /* selector #1 */
  |*:active { color: green }   /* selector #2 */

it says that selector #1 should be serialized as ":hover", and
possibly the same (though I think the wording is ambiguous, since
there is no namespace prefix, but the lack of namespace prefix
indeed maps to the null namespace) for selector #2.  However, in
both cases, :hover is semantically different, since ":hover" alone,
given the default namespace, matches any elements in the HTML
namespace that are in the :hover state.

I think the words "of which the namespace prefix maps to the null
namespace (not in a namespace) or" should be removed.  Universal
selectors can be omitted only when their namespace part is the
default namespace.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂
Received on Saturday, 8 June 2013 06:09:16 UTC

This archive was generated by hypermail 2.3.1 : Saturday, 8 June 2013 06:09:16 UTC