Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Faq accordion main | HTML | CSS | vanilla JS

Lucas Cerriโ€ข 1,120

@llKryptonixll

Desktop design screenshot for the FAQ accordion coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


This is the first time i used BEM for css class names. If someone has any tips, feel free to share them.

Community feedback

@MelvinAguilar

Posted

Hello there ๐Ÿ‘‹. Good job on completing the challenge !

I have some suggestions about your code that might interest you.

  • When following the BEM naming convention, avoid repeating __ in class names because only one block name is allowed. For instance, the class name .card__list__header__minus__icon doesn't follow the pattern: "block-name__element-name" and includes the block names list, header, minus and icon.

    You can reference an example of this error here: BEM Quick start - Nesting.

  • It's a bit confusing that the entire div with the class faq-card__list__header has a pointer cursor, but the element that triggers the display is the <h2>. To improve user experience and clarity, consider adding the event listener to the entire div container, making it clickable. This way, users won't be confused about where to click, and the interaction will feel more intuitive.

I hope you find it useful! ๐Ÿ˜„ Above all, the solution you submitted is great!

Happy coding!

Marked as helpful

0

Please log in to post a comment

Log in with GitHub
Discord logo

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