Submitted over 2 years ago
FAQ accordion card without JavaScript, using details/summary elements
@Milleus
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 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