Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can do without javascript. Checkbox `:checked` + `label` trick for toggling states still works.

See: https://codepen.io/abdus/pen/bNpQqXv





Thanks, I’ll check this out!

Here's a version with a 3-way theme selector (light / system / dark) using radio inputs.

https://codepen.io/abdus/pen/yyOQpvE




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: