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

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