Re: [csswg-drafts] [selectors4] Name the “functional pseudo-class like :matches() with 0 specificity”

Another option, fwiw, would be to use bare parens for eliminating specificity. There are two interpretations: one would be it's treated like a pseudo-class syntax, except without the preceding `:foo`. The other is that the selector is interpreted exactly as if the parentheses weren't there, except that any selectors inside the parentheses aren't counted for specificity.

Example: `foo(.a > .b) .c` -- the two options would match this as `foo:matches(.a > .b) .c` (option A) or as `foo.a > .b .c` (option B).

For case B, if it's considered weird, we could say that the parens can't cross hierachical boundaries, i.e. that example above would be invalid, but you could write `foo(.a) > (.b .c)` to mean the same thing.

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

Received on Tuesday, 16 January 2018 22:10:59 UTC