W3C home > Mailing lists > Public > public-css-archive@w3.org > January 2018

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

From: fantasai via GitHub <sysbot+gh@w3.org>
Date: Tue, 16 Jan 2018 22:10:57 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-358124504-1516140656-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:23 UTC