Design comparison
SolutionDesign
Solution retrospective
This is my solution for the FAQ Accordion Card Component.
It was overall easy and enjoyable building this project, however I faced a difficulty regarding the accordion:
- I would like to figure out how to change
font-weight
to400
for the.acc-header
class when I exit a selected question. I have tried out this line:
content.style.display =
content.style.display === "block" ? "none" : "block";
header.style.display =
content.style.fontWeight === 700 ? 400 : 700;
However, it simply reverts every header
to 400
and thus changes nothing. Meanwhile, other solutions simply bring about the same result as with the current situation
I would appreciate your feedback and would like to receive your comments and perspectives regarding the project. Thanks a lot!
Community feedback
Please log in to post a comment
Log in with GitHubJoin 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