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

The case at above is the :visited in the :has() argument.

For example, when we have :has(:visited) {...}, the subject elements of the rule are the ancestors of the visited link element. In this case, the rule should not be applied because the ancestor elements are not link. The ':visited' in ':visited .a { ... }' will match, but the ':visited' in '.a:has(:visited)' will not match to prevent leaking visitedness out of the link elements.

It can be said that this approach follows the current chrome approach which only allows the 'descendant combinator' or 'child combinator' for the ':visited' match, because the meaning of ':has()' is technically 'ancestor combinator' or 'preceding sibling combinator'

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 9 June 2021 13:25:37 UTC