- From: Simon Pieters <simonp@opera.com>
- Date: Thu, 13 Jun 2013 11:51:26 +0200
- To: "L. David Baron" <dbaron@dbaron.org>
- CC: www-style@w3.org
On 6/8/13 8:08 AM, L. David Baron wrote: > 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 > https://dvcs.w3.org/hg/csswg/rev/f15e37a210a8 http://dev.w3.org/csswg/css-syntax/#serializing-anb seems to not have the problems mentioned above. (I could put this in CSSOM instead if that's better.) -- Simon Pieters Opera Software
Received on Thursday, 13 June 2013 09:50:37 UTC