Re: [csswg-drafts] [selectors] Functional pseudo-class like :matches() with 0 specificity

I have a component with a lot of states, but I want to have a single class. I do this with data attributes now, but it increases specificity. Currently it's something like this (Suggest naming this :is)...

```css
.button {
    ...styles 

    &:is([data-size=small]) {
        ...styles
    } 
    &:is(:focus) {
        ...styles
    }
    &:is([disabled]) {
        ...styles
    }
    &:is([data-selected]) {
        ...styles
    } 
}
```

-- 
GitHub Notification of comment by studiosciences
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1170#issuecomment-329875704 using your GitHub account

Received on Friday, 15 September 2017 19:18:50 UTC