W3C home > Mailing lists > Public > www-style@w3.org > February 2016

[selectors] :not(:checked) example is suboptimal

From: Chris Rebert <csswg@chrisrebert.com>
Date: Sun, 07 Feb 2016 23:04:10 -0800
Message-Id: <1454915050.2966278.514777122.76259F7E@webmail.messagingengine.com>
To: CSS WG <www-style@w3.org>
Currently, in https://drafts.csswg.org/selectors-4/#checked there's:

> EXAMPLE 34
> An unchecked checkbox can be selected by using the negation pseudo-class:
> :not(:checked)

This strikes me as a suboptimal, especially-unrealistic example since in
addition to unchecked checkboxes, it also matches *all elements which
lack a concept of checkedness* (i.e. almost all elements; e.g. <div>,
<span>). (And unchecked radio buttons too, but that's a much more minor
point.)

Perhaps the example selector could be qualified with
`input[type="checkbox"]` ?

Regards,
Chris
--
https://github.com/cvrebert
Browser 🐛 of the day: http://wkbug.com/153852
Received on Monday, 8 February 2016 07:04:35 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:00 UTC