@brasspetals
Posted
It is possible! You can use radio buttons - tutorial here.
@zuolizhu
Posted
@brasspetals ๐ฏ๐คฉ That's smaaaart! Thanks man!
@mattstuddert
Posted
Nice! I like that approach. Another pure HTML and CSS solution would be to use the details
element. It's perfect for accordions! Here's some more info on MDN.
@brasspetals
Posted
@mattstuddert I had no idea this was a thing that existed. ๐คฏ Thank you!
@mattstuddert
Posted
@brasspetals no problem! For browsers that don't support it the accordions all just default to open as well. So it's a nice pattern to use that still "works" on older browsers ๐