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

[csswg-drafts] [selector-4] Do we need selector for `is` attribute?

From: HE Shi-Jun via GitHub <sysbot+gh@w3.org>
Date: Fri, 16 Nov 2018 05:33:28 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-381453228-1542346407-sysbot+gh@w3.org>
hax has just created a new issue for https://github.com/w3c/csswg-drafts:

== [selector-4] Do we need selector for `is` attribute? ==
Currently we have to use `element[is=custom-name]` which have different specificity with `custom-element`. It also means `li[is=my-li]` have higher specificity than `ol > li` which may not meet what dev's want.

I guess the specificity for `is` selector may be 0, or 0.1 😝 which means `x` < `x:is(extends-x)` < `x y`

To be honest, I'm not sure whether we really need `is` attr selector, it could be postpone to selector-5 or further, until we have much real world experiences on custom elements. But, unfortunately recent renaming from `:matches()` to `:is()` have conflict with the `:is()` for `is` attr selector, see https://github.com/w3c/csswg-drafts/issues/3258#issuecomment-439006553 , so we'd better discuss it now.

To solve the syntax conflict, we can:
1. rename (again 😜) `:is`, for example `:any`
2. use non-pseudo-class syntax for `is` selector, for example `x!extends-x`

Or, if we have confidence that we do not need `is` attr selector at all, then no problem 😅



Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3327 using your GitHub account
Received on Friday, 16 November 2018 05:33:29 UTC

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