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: Stanislav Lashmanov via GitHub <sysbot+gh@w3.org>
Date: Fri, 13 Jul 2018 17:04:20 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-404893789-1531501458-sysbot+gh@w3.org>
Hmm, what about `:foreach`? It basically takes an array of arguments and for each item performs some operation, without affecting anything, similar to the `forEach` array method in JS.

So if with JS we would write:
['.a', '.b', '.c'].forEach(item => doSomething(item + ' el'));
In CSS it would become:
:foreach(.a,.b,.c) el {
  // doSomething

GitHub Notification of comment by CyberAP
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2143#issuecomment-404893789 using your GitHub account
Received on Friday, 13 July 2018 17:04:59 UTC

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