W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2017

Re: [whatwg] HTML inputs directly toggling CSS classes on elements?

From: Roger Hågensen <rh_whatwg@skuldwyrm.no>
Date: Sun, 10 Sep 2017 13:25:32 +0200
To: whatwg@lists.whatwg.org
Message-ID: <a0c22ad2-2bb6-c69b-a17b-e84833ad716e@skuldwyrm.no>
On 2017-09-09 18:41, Alex Vincent wrote:
> A few days ago, I dipped my toes into web design again for the first time
> in a while.  One of the results is the CSSClassToggleHandler constructor
> from [1].  Basically, it takes an radio button or checkbox, and turns that
> input into a toggle for a CSS class on another element.

You do have :checked

While I haven't used that with radio or checkboxes much myself it seems 
to at least partially do what you are describing.


Unless specified otherwise, anything I write publicly is considered 
Public Domain (CC0). My opinions are my own unless specified otherwise.
Roger Hågensen,
Freelancer, Norway.
Received on Sunday, 10 September 2017 11:26:08 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:44 UTC