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

Responsive FAQ Accordion with Tailwind CSS

Yash Kadamβ€’ 280

@yash-278

Desktop design screenshot for the FAQ accordion card coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hi, FrontEnd Mentor Community, this is my solution for FAQ Accordion Component Challenge.

I was able to completely do it in CSS but for unchecking remaining boxes, needed to use a JS function.

Feedback Welcome 😊

Community feedback

Ivanβ€’ 2,630

@isprutfromua

Posted

Hi there. You did a good job 😎

keep improving your programming skillsπŸ› οΈ

your solution looks great, however, if you want to improve it, you can follow these steps:

βœ… please add alternative text. It'll improve accessibility

 <img
            class="absolute top-1/3 h-[900px] max-h-[900px] w-[900px] -translate-y-1/2 overflow-clip object-cover object-right"
            src="./images/bg-pattern-desktop.svg"
            alt=""
          />

βœ… don't use tag selectors. When you add CSS directly on tags, your markup can’t change. Your style is tightly coupled to your DOM, and any change increases the risk of breaking things.

ul li input[type="checkbox"]:checked ~ h2

βœ… place the Google import code such that it loads first directly after the html HEAD tag, EVEN before loading the CSS file. This ensures the fonts load before the CSS so there isn't any unexpected "jumping" of when the font finally loads.

@import url("https://fonts.googleapis.com/css2?family=Kumbh+Sans:wght@400;700&display=swap");

βœ… you can avoid using scripts by using radio buttons

I hope my feedback will be helpful. You can mark it as useful if so πŸ‘

Good luck and fun coding 🀝⌨️

Marked as helpful

1

Yash Kadamβ€’ 280

@yash-278

Posted

@isprutfromua Thanks for taking your time, and giving me value able feedback. I mostly forget about the accessibility stuff sometimes πŸ˜…. I'll incorporate your feedback into this project and upcoming ones.

Thanks a lot! 😊

0
Ivanβ€’ 2,630

@isprutfromua

Posted

@yash-278 I am glad that my help was useful to you

Cheers, peace and happy coding!

1

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