A Complete State Machine Made With HTML Checkboxes and CSS

State machines are typically expressed on the web in JavaScript and often through the popular XState library. But the concept of a state machine is adaptable to just about any language, including, amazingly, HTML and CSS. In this article, we’re going to do exactly that. I recently built a website that included a “no client JavaScript” constraint and I needed one particular unique interactive feature. The key to all this is using and elements to hold a … Read article “A Complete State Machine Made With HTML Checkboxes and CSS”

The post A Complete State Machine Made With HTML Checkboxes and CSS appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://css-tricks.com/a-complete-state-machine-made-with-html-checkboxes-and-css/

Létrehozva 5y | 2020. dec. 2. 19:21:13


Jelentkezéshez jelentkezzen be

EGYÉB POSTS Ebben a csoportban

A Few Things About the Anchor Element’s href You Might Not Have Known

It's easy to take URL superpowers for granted, even if you already have these patterns under your belt.


2025. aug. 15. 15:50:10 | CSS tricks
Covering hidden=until-found

Short story: Slapping hidden=until-found on an element in HTML enables any hidden content within the element to be findable in the browser with in-page search.


2025. aug. 15. 13:30:21 | CSS tricks
On Accessibility Conformance, Design Systems, and CSS “Base” Units

My brain can’t help but try to make connections between seemingly disparate ideas. And that’s what happened yesterday when I read:

  • Hidde’s
2025. aug. 14. 14:20:30 | CSS tricks
We Might Need Something Between Root and Relative CSS Units for “Base Elements”

I've come to realize that perhaps we need to have a unit between root and relative values. This would bring about a whole new possibility when creating reusable components.


2025. aug. 13. 15:10:33 | CSS tricks
CSS-Questions

CSS-Questions is a mini site where you can test your CSS knowledge with over 100 questions.


CSS-Questions or

2025. aug. 12. 15:50:20 | CSS tricks
Stuff & Nonsense Practical Layout Workshop

Web design veteran Andy Clarke is offering a two-hour workshop all about creating practical and creative page layouts this September 18. Register and save a few bucks with a coupon code.


2025. aug. 11. 16:40:19 | CSS tricks
Getting Creative With Quotes

How do you design block quotes and pull quotes to reflect a brand’s visual identity and help tell its story? Here’s how I do it by styling the HTML blockquote element using borders, de

2025. aug. 11. 14:30:13 | CSS tricks