- From: L. David Baron <dbaron@dbaron.org>
- Date: Mon, 23 Mar 2015 18:17:57 -0700
- To: www-style@w3.org
- Message-ID: <20150324011757.GA8751@pescadero.dbaron.org>
http://dev.w3.org/csswg/selectors-4/#evaluating-selectors introduces an algorithm that defines how selectors are matched. It does so by doing the matching from left to right (across combinators), which is the opposite of what all implementations that I'm aware of do. Specifying it this way seems like a very bad idea, because it introduces a number of risks: (1) specification authors might introduce features that are easy to describe in the spec's left-to-right matching but hard to implement in the implementations' right-to-left matching (2) we might want to introduce features that are simple in the implementations' right-to-left matching, but that are hard to describe it the spec's right-to-left matching (3) we might introduce features where it's easy to make subtle errors in the mapping between the two descriptions; this can lead to things that are technically bugs in implementations, and might even do so interoperably. It's better for these not to be bugs, and just to match the spec. So I think that if the spec introduces an algorithmic description of selector matching (as the current draft of selectors-4 does), that algorithm should work the same way implementations work. -David -- 𝄞 L. David Baron http://dbaron.org/ 𝄂 𝄢 Mozilla https://www.mozilla.org/ 𝄂 Before I built a wall I'd ask to know What I was walling in or walling out, And to whom I was like to give offense. - Robert Frost, Mending Wall (1914)
Received on Tuesday, 24 March 2015 01:18:22 UTC