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

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

From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
Date: Wed, 04 Jul 2018 07:04:04 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-402383758-1530687843-sysbot+gh@w3.org>
The Working Group just discussed `Bikeshed the 0 specificity alternative to :matches()`.

<details><summary>The full IRC log of that discussion</summary>
&lt;florian> Topic: Bikeshed the 0 specificity alternative to :matches()<br>
&lt;leaverou> Table: https://github.com/w3c/csswg-drafts/issues/2143#issuecomment-360586470<br>
&lt;dbaron> github: https://github.com/w3c/csswg-drafts/issues/2143#issuecomment-360586470<br>
&lt;florian> ericwilligers: [projets the issue]<br>
&lt;florian> fantasai: if we have :not and :is, they should have the same specificity<br>
&lt;florian> ericwilligers: matches has changed specificity recently<br>
&lt;florian> fantasai: that's out of scope here<br>
&lt;florian> ericwilligers: :when was time based, so I proposed :where, haven't heard back<br>
&lt;florian> astearns: does anyone have problem with :where ?<br>
&lt;florian> leaverou: has does that avoid the problems that :is has?<br>
&lt;florian> fantasai: because :is and :not need to be opposite<br>
&lt;florian> leaverou: how about having :is-not be the opposite of :is<br>
&lt;florian> all: Noooo<br>
&lt;florian> frremy: :where works for me<br>
&lt;florian> ericwilligers: has to combine well with :not()<br>
&lt;florian> leaverou: why can't we change :matches? it has shipped, but nobody uses it yet<br>
&lt;florian> astearns: we've discussed doing it several time, and failed to reach consensus<br>
&lt;florian> fantasai: lea propose to just change the specificity of :matches, and add a new one for the other specificity<br>
&lt;florian> frremy: why use the :match name at all, it's a bad name<br>
&lt;florian> leaverou: we're stuck with it anyway<br>
&lt;florian> fantasai: I want a short list so that we can think about it<br>
&lt;florian> leaverou: would you object to :is if it did what matches currently does, and :match() is the 0 specificity one?<br>
&lt;florian> fantasai: no, I would not<br>
&lt;florian> leaverou: what if we just have one, with an argument for specificity<br>
&lt;florian> fantasai: too confusing<br>
&lt;florian> shane: :where makes sense for people who have used SQL, but for others it is confusing, and seems to involve position<br>
&lt;dbaron> Whiteboard:<br>
&lt;florian> leaverou: I find SQL readable, but that's because it's a full sentence, which isn't the case in css<br>
&lt;florian> fantasai: I like 2 and 4<br>
&lt;Rossen> Here are the options<br>
&lt;dbaron> 1. :is()<br>
&lt;dbaron> 2. :matches() + replace existing :matches() with :is()<br>
&lt;Rossen> 1. :is()<br>
&lt;Rossen> 3. :if()<br>
&lt;Rossen> 4. :also()<br>
&lt;Rossen> 5. :where()<br>
&lt;florian> frremy: :and means nothing to me, all selectors already imply that<br>
&lt;Rossen> 6. :selects()<br>
&lt;florian> fantasai: yes, but :also doesn't have that implication<br>
&lt;florian> leaverou: in favor of :also<br>
&lt;florian> Rossen: [makes funny inaudible jokes]<br>
&lt;florian> dbaron: we have an html element called select<br>
&lt;florian> Rossen: let's start removing<br>
&lt;florian> Rossen: kill select<br>
&lt;florian> ericwilligers: I think we can also kill :if<br>
&lt;florian> Rossen: :if would need an :else<br>
&lt;florian> frremy: why?<br>
&lt;Rossen> 7. :also() + replace existing :matches() with :is()<br>
&lt;florian> leaverou: I'd like 7<br>
&lt;florian> frremy: this was called that way because the DOM API is called that<br>
&lt;florian> fantasai: actually, it's very old and it's the other way around<br>
&lt;florian> ericwilligers: it has been in webkit for a long time<br>
&lt;florian> astearns: how much web content uses :matches?<br>
&lt;florian> iank_: not a lot, looking at usecounter<br>
&lt;florian> ericwilligers: usecounter may be wrong<br>
&lt;dbaron> "the other way around" was in reference to original name being :any or :matches.<br>
&lt;florian> Rossen: is either 2 or 7 an option? they involve changing :matches. webkit people, can we do that?<br>
&lt;florian> myles: we could<br>
&lt;florian> myles: we would be moderately interested in updating, but it's low priority<br>
&lt;florian> dino: why ?<br>
&lt;florian> fantasai: because a best named proposal otherwise is :is, but it is bad if it's specificity doesn't match :not<br>
&lt;florian> fantasai: so we could change :matches to be the 0 specificity one, freeing the room for :is to do what :matches does now<br>
&lt;florian> leaverou: maybe we can resolve on that in parts<br>
&lt;florian> fantasai: removing option 1<br>
&lt;dbaron> I implemented :-moz-any() in Gecko in 2010 in https://bugzilla.mozilla.org/show_bug.cgi?id=544834<br>
&lt;florian> fantasai: the web compat impact of 2 and 7 are different<br>
&lt;florian> ericwilligers: does anyone want 2?<br>
&lt;florian> fantasai: removing 2<br>
&lt;florian> [lots of people]: I don't like also.<br>
&lt;florian> [lots of people]: [lots of jokes]<br>
&lt;florian> leaverou: what's wrong with :also ?<br>
&lt;Rossen> :soso()<br>
&lt;florian> dbaron: :also comes after something, but it doesn't come after anything particular<br>
&lt;florian> Rossen: agreed (with a pun)<br>
&lt;florian> ericwilligers: :where implies position OR situation<br>
&lt;florian> fantasai: does :where not have the same problem as :also?<br>
&lt;florian> fantasai: :matches does not have that problem<br>
&lt;florian> frremy: I prefer :where and :if, and :if makes a lot of sense when you read it<br>
&lt;dbaron> The thing I was talking about was called a "simple selector" in CSS 2, a "sequence of simple selectors" in selectors-3, and a "compound selector" in selectors-4.<br>
&lt;florian> astearns: :if clashes with JS?<br>
&lt;florian> [lots of people]: it doesn't<br>
&lt;florian> ...: :if calls for :else<br>
&lt;florian> ...: it doesn't<br>
&lt;florian> philipwalton: ??????<br>
&lt;florian> heycam: one option was to have a specificity parameter in :matches<br>
&lt;florian> astearns: we have agreed that renaming :matches is not necessary to solve this<br>
&lt;dbaron> s/??????/was the reason for doing this  that the specificity was bad, or to give control over specificity?  [answer: latter]  It seems like a pseudo-class isn't the right tool for that, but I guess that's the right tool for the job./<br>
&lt;florian> astearns: we rejected some of the options, we should make a smaller list of plausible<br>
&lt;florian> fantasai: we should make a strawpoll, and then call for objections on the most popular<br>
&lt;florian> fantasai: :if gets 7 votes<br>
&lt;florian> fantasai: :also gets 1.5votes<br>
&lt;florian> fantasai: :where gets 7 votes<br>
&lt;florian> astearns: objections to :if ?<br>
&lt;florian> astearns: objections to :where ?<br>
&lt;florian> leaverou, fantasai, iank_: strong reservations<br>
&lt;tantek> let's strawpoll if vs where!<br>
&lt;florian> astearns: I am not declaring consensus<br>
&lt;florian> astearns: we will ask outsiders about :if vs :where<br>

GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2143#issuecomment-402383758 using your GitHub account
Received on Wednesday, 4 July 2018 07:04:12 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 4 July 2018 07:04:13 UTC