FAQ accordion card without JavaScript, using details/summary elements

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! 🙇♂️🙏
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Dave Quah'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