@hassaneljebyly
Posted
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 helpful
@Ben-Ricketts
Posted
@hassaneljebyly that's a much better idea. Thank you very much! :)