Re: [csswg-drafts] [selectors] :link and :visited are not mutually exclusive in implementations

Looking at the test case a bit more, here is what I understand the difference between Edge and other browsers to be:

Edge:
- Apply all :link rules and, for allowed properties, also apply all :visited rules (at the same time)

Other browsers:
- Apply all rules that do not have :visited (including :link rules)
- Apply all rules that have :visited or do have neither :link nor :visited

The difference is the cascade order. Effectively, a :link rule can override a :visited rule in Edge if its specificity is higher. In Firefox and Chrome, it cannot because this is done as part of a clean second pass.

https://jsfiddle.net/ngtby4te/ shows this (lime outline but yellow background in Edge)

Perf-wise, our behavior seems better. Not sure this is something we want to fix, I am yet to see any issue appear because of that.


-- 
GitHub Notification of comment by FremyCompany
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2037#issuecomment-349457581 using your GitHub account

Received on Tuesday, 5 December 2017 22:06:44 UTC