Social media dashboard - JavaScript HTML DOM, SCSS, Grid, Flexbox
Design comparison
Solution retrospective
I'm still learning, so please let me know if there's ANYTHING I can improve on (code, code-structure, logic, best practices, etc)! I Love constructive feedback :-)
Community feedback
- @mattstuddertPosted over 4 years ago
Awesome work on this challenge, Alex! Your solution looks really good and scales down beautifully to mobile. What was your reasoning for how you coded it all with JS?
My main recommendation is to avoid setting click listeners on non-interactive elements, like the
div
element for the toggle. These can't be accessed by anyone not using a mouse/trackpad to navigate the content, which is a bad practice. Instead, add click listeners to interactive elements likea
orbutton
. This will ensure the element is focusable and can be accessed by people not using a mouse/trackpad.I hope you enjoyed this challenge. Keep up the great work!
0@awexliPosted over 4 years ago@mattstuddert Thanks for the feedback! I changed the
div
element toa
and set its role to a button. I hope that's a better solution since I've always had such a hard time styling buttons.As for why I coded it with JS, I just wanted to practice DOM manipulation haha
Thanks Matt, I'm having a lot of fun with Frontend Mentor!
0@mattstuddertPosted over 4 years ago@awexli haha, fair enough! It's a great way to learn more about DOM manipulation.
I'd recommend just using a
button
to be honest. If you ever find yourself setting therole
of an element to another element that already exists that's normally the sign of a code smell. The main thing with stylingbutton
elements is that you normally need to just remove theborder
and set thefont-family
. Apart from that, it's pretty much the same as an anchor tag (except they'reinline-block
by default).That's great to hear you're enjoying Frontend Mentor! 🥳
0@awexliPosted over 4 years ago@mattstuddert Ah I see! Thanks, I'll start applying that moving forward!
0
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