Re: [selectors] What is the order of evaluation of :matches() and :not()?

On 28/08/14 22:30, Benjamin Poulain wrote:
> Hi,
>
> The order in which selectors are evaluated has various side effects
> on what and how rules are applied.
>
> One obvious example is the matching of :visited. Let say we have
> “:matches(:visited, .foobar)”. If a link has the class foobar, its
> style varies if the engine evaluate selectors from left to right or
> right to left.
>
> It looks like the order of evaluation should be defined to ensure all
> the browsers behave consistently.
>
> Alternatively, it can be defined that they all match as if each
> disjunction would produce a new rule, which is also fine as long as
> it is specified.

The comma inside :matches() (just like outside) indicates a 
boolean/logical "or". Since "or" is commutative (A or B == B or A, for 
every A and B), I don’t believe the evaluation order has any effect on 
the result.

(In this boolean view of Selectors, :matches() is just 
grouping/parentheses.)

Did I misunderstand your message?

-- 
Simon Sapin

Received on Thursday, 28 August 2014 21:37:50 UTC