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

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:
```javascript
['.a', '.b', '.c'].forEach(item => doSomething(item + ' el'));
```
In CSS it would become:
```css
: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