Skip to content

Mission Statement II: Feedback #2

@fbscott

Description

@fbscott

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.

<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.

<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!

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions