Design comparison
Solution retrospective
Please check the code and give me tips
Community feedback
- @vanzasetiaPosted over 1 year ago
Hi, Sadeek_Akbik!
You don't need to use jQuery for this size of the project. It's just my opinion.
I recommend using the native HTML elements for the accordions,
<summary>
and<details>
. Otherwise, you should use button elements for them. Then, usearia-expanded
attribute to tell the state of the accordion panel, whether it is expanded or collapsed.In your CSS, I notice this selector
body .container .img .desk-img
while that only needs to be.desk-img
. Only nesting when you want to style pseudo-elements, pseudo-classes (:hover
,:focus
, etc), and@media
queries. This way, it can help you produce low specificity CSS.I wrote a blog post that can help you to write Sass. It contains five code snippets. They can help you write media queries, convert
px
torem
, and much more.5 Handy Sass Code Snippets — Vanza Setia
I hope this helps. Happy coding! 😄
1
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