Re: [csswg-drafts] [selectors] Add selector for blank inputs

I wrote a script to simulate this effect by adding an `empty-within` attribute to elements that are an empty text control or contain one.

https://jonathantneal.github.io/empty-within/

I hope this can demonstrate the value in such a selector, as well how applicable it may already be.

One thing I have learned in this exercise is that I would not want this blank input selector to target regular elements. For instance, if `:empty` were merely extended to capture empty inputs, then `:has(:empty)` (or something like `:empty-within`) could end up capturing non-form elements, such as decorative markup that was unrelated to the intent of my styling. I hope this makes some sense.

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

Received on Monday, 19 February 2018 04:47:31 UTC