No JS - FAQ Accordion Challenge - flexbox desktop only not responsive

Solution retrospective
-
That image layout was hard!!! Like rock inside an onion. I persevered and finally got it. I ended up going through the SVG file for the geometry of the platform and then learned how to make my own SVG, so I could use them as the backdrop and the wireframe outline above. If there is an easier way, please let me know!
-
I set out specifically to do the accordion with only css because I wanted the practice (Why I'm here at Frontend Mentor). The choice reinforced how limiting the ID selector is, as well as the 'for' attribute in the <label> tag. It led to a ton of code duplication that would make me want to do the project again with JS. I realized I should have gone with radio buttons instead of checkboxes as it would only allow one question open at a time vs. having them all opened.
If I could make the accordion CSS any less duplicated without delving into javascript, please let me know. I tried all the ways I could find to avoid the copy paste increment route.
Thanks!
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Wave's solution.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord