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

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.

https://developer.mozilla.org/en-US/docs/Web/CSS/:checked




-- 
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