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

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

From: Benjamin Poulain <bpoulain@apple.com>
Date: Thu, 28 Aug 2014 14:30:02 -0700
Message-id: <1603ED52-A8A4-46D6-A37B-A19DCFAF459C@apple.com>
To: www-style@w3.org
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.

Benjamin
Received on Thursday, 28 August 2014 21:31:52 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:45 UTC