Design comparison
SolutionDesign
Solution retrospective
really trying to get better at javascript to hopefully move onto learning some react soon. please give me any critical feedback i could use to brush up on my code. Thank you very much
Community feedback
- @hassaneljebylyPosted over 1 year ago
my suggestion is to create a class for unread notifications instead of specifically selecting by user name, that way your code can be easily scalable example :
css
.unread { background-color: var(--clr-unread); }
js
const unreadNotifications = document.querySelectorAll(".unread"); function changeColorWrapper() { unreadNotifications.forEach((notification)=>{ notification.classList.remove("unread"); }); }
I suggest you check this : building a scalable css architecture
keep building :)
Marked as helpful1@Ben-RickettsPosted over 1 year ago@hassaneljebyly that's a much better idea. Thank you very much! :)
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