CodePen<\/a>.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"Using a hidden checkbox, you can re-create a lot of functionality on website that rely on clicks and toggled states. Fair warning, it’s not always super semantic or a good idea, but it’s awful fun to play with.<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"c2c_always_allow_admin_comments":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[4],"tags":[743,943],"jetpack_publicize_connections":[],"acf":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":320113,"url":"https:\/\/css-tricks.com\/menu-reveal-by-page-rotate-animation\/","url_meta":{"origin":15713,"position":0},"title":"Menu Reveal By Page Rotate Animation","date":"September 8, 2020","format":false,"excerpt":"There are many different approaches to menus on websites. Some menus are persistent, always in view and display all the options. Other menus are hidden by design and need to be opened to view the options. And there are even additional approaches on how hidden menus reveal their menu items.\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/08\/menu-reveal-swing-open-1.png?fit=1200%2C596&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":190426,"url":"https:\/\/css-tricks.com\/exposing-form-fields-radio-button-css\/","url_meta":{"origin":15713,"position":1},"title":"Exposing Additional Form Fields via Checked Radio Buttons","date":"December 9, 2014","format":false,"excerpt":"There is a :checked pseudo class in CSS. I often think of it in connection with the \"checkbox hack\", in which you use it on a hidden checkbox with the ~ general sibling combinator to simulate toggling behavior without any JavaScript. It's a hack because now you have these stray\u2026","rel":"","context":"In "Intermediate"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":242197,"url":"https:\/\/css-tricks.com\/creating-css-sliding-door-effect\/","url_meta":{"origin":15713,"position":2},"title":"Creating a CSS Curtain Opening Effect","date":"June 1, 2016","format":false,"excerpt":"If you're as old as me, you might remember watching Let's Make a Deal on the old television airwaves. The show is apparently still on these days in a new format, but the original always stuck out to me because of one simple thing: the reveal. There's something exciting about\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":351034,"url":"https:\/\/css-tricks.com\/fun-times-styling-checkbox-states\/","url_meta":{"origin":15713,"position":3},"title":"Fun Times Styling Checkbox States","date":"September 10, 2021","format":false,"excerpt":"We might leave a text input unstyled. We might leave a link unstyled. Even a button. But checkboxes\u2026 we don\u2019t leave them alone. That\u2019s why styling checkboxes never gets old. Although designing checkboxes is not that complicated, we also don\u2019t have to settle for simple background color changes, or adding\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/09\/fun-checkboxes.jpg?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":302330,"url":"https:\/\/css-tricks.com\/custom-styling-form-inputs-with-modern-css-features\/","url_meta":{"origin":15713,"position":4},"title":"Custom Styling Form Inputs With Modern CSS Features","date":"February 7, 2020","format":false,"excerpt":"It\u2019s entirely possible to build custom checkboxes, radio buttons, and toggle switches these days, while staying semantic and accessible. We don\u2019t even need a single line of JavaScript or extra HTML elements! It\u2019s actually gotten easier lately than it has been in the past. Let\u2019s take a look. Here\u2019s where\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/01\/custom-form-inputs.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":331541,"url":"https:\/\/css-tricks.com\/whack-a-mole-the-css-edition\/","url_meta":{"origin":15713,"position":5},"title":"Whack-a-Mole: The CSS Edition","date":"January 6, 2021","format":false,"excerpt":"We\u2019ve seen the checkbox hack and how it can be used to build a complete state machine in CSS. Today, we\u2019ll take that line of thought a step further and build a simple game of Whack-A-Mole, where the player needs to react quickly to win \u2026 all without a touch\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/12\/whack-a-mole-css.jpg?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"featured_media_src_url":null,"_links":{"self":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/15713"}],"collection":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/comments?post=15713"}],"version-history":[{"count":10,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/15713\/revisions"}],"predecessor-version":[{"id":302614,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/15713\/revisions\/302614"}],"wp:attachment":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media?parent=15713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/categories?post=15713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/tags?post=15713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}