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

Re: [csswg-drafts] [css-selectors] Selectors for “text-ish” and “button-ish” inputs

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Sat, 10 Feb 2018 20:23:03 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-364688524-1518294182-sysbot+gh@w3.org>
Instead of adding gallizions of new pseudo-classes, also consider extending the syntax of attribute selectors, which can have benefits outside of HTML. For example:
```css
input[type in {text, search, tel, url, email, password,
               date, month, week, time, number, color}] {}
input:not([type in {button, submit, reset}]) {}
```

Still long, but looks much better. Basically, `{}` could be used after `in` to represent a set of values (identifiers or strings). And maybe `$in`, `^in`, `|in`, `~in`, etc. could work too.


-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2296#issuecomment-364688524 using your GitHub account
Received on Saturday, 10 February 2018 20:23:06 UTC

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