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 card without JavaScript, using details/summary elements

#cube-css
P
Dave Quahβ€’ 670

@Milleus

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


Hello everyone πŸ‘‹,

Here's my solution for FAQ accordion card without JavaScript. I'm using <details> and <summary> HTML elements instead.

The illustrations should also scale properly when the base font-size changes and it should not shift when the accordion opens, unless it overflows.

One thing I've learnt was that to remove the summary disclosure triangle for webkit-based browsers such as Safari, we have to use summary::-webkit-details-marker { display: none }. Sigh... Safari πŸ˜”

I'd appreciate it if you can provide feedback on my solution. Thanks and happy coding! πŸ™‡β€β™‚οΈπŸ™

Community feedback

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