-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Great job on this submission!
This feedback is not necessarily comprehensive, but should give you insight into at least one aspect of the code that could be praised or enhanced.
HTML
Semantic Markup
Nice work! Your <select> element appropriately adds a "dark" class to the <body> element.
Lines 13 to 16 in aca4552
| <select id="themeSelector"> | |
| <option value="light">Light</option> | |
| <option value="dark">Dark</option> | |
| </select> |
It's not necessary to start off with a light class, especially considering there are no .light CSS rules in your stylesheet.
Line 10 in aca4552
| <body class="light"> |
CSS
Accessibility
Excellent job accounting for the appropriate colors in dark mode! Taking accessibility into consideration is important in web and app development.
JavaScript
Selects, Listens, and Responds to Change Events
Great job toggling the dark class on a <select> element change event!
Lines 6 to 14 in aca4552
| function changeTheme() { | |
| if (themeSelector.value === "dark") { | |
| document.body.classList.add("dark"); | |
| logo.src = "byui-white.png"; // white logo for dark background | |
| } else { | |
| document.body.classList.remove("dark"); | |
| logo.src = "byui-blue.png"; // blue logo for light background | |
| } | |
| } |
Code Quality
Your code is easy to read and understand. Developers who might pick up where you left off would have no problems maintaining this project.
Excellent work!