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

Re: [csswg-drafts] [selectors-4] Issue 11: Introduce pseudo-class matching when user changed the value of an input (#1533)

From: Tommy Hodgins via GitHub <sysbot+gh@w3.org>
Date: Sat, 08 Dec 2018 01:45:07 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-445419552-1544233506-sysbot+gh@w3.org>
Oooh what a fun idea! Here's a quick demo of what using `:modified` in CSS stylesheets might feel like by using `el.value !== el.defaultValue` logic in JavaScript with a made-up `[--modified]` selector in CSS that we can grab onto to implement the functionality: https://codepen.io/tomhodgins/pen/YdKveq

```css
input[--modified] {
  background: lime;
}
```

It's kind of fun, and does fill a current gap with `[value=""]` and `<input>` elements between the `value` and the [dirty value](https://html.spec.whatwg.org/#concept-fe-dirty).

-- 
GitHub Notification of comment by tomhodgins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1533#issuecomment-445419552 using your GitHub account
Received on Saturday, 8 December 2018 01:45:08 UTC

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