Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dark Mode Feature: I added a dark mode feature to the project. This includes:
A Dark Mode Toggle Button that allows users to switch between light and dark modes.
The toggle button updates both its icon (switching between a sun and a moon) and text (displaying either "Light Mode" or "Dark Mode").
The dark mode setting is stored in localStorage, so the user's preference persists across page reloads.
JavaScript: The dark mode logic was implemented in a separate JavaScript file that contains:
Functions for applying and removing dark mode.
Event listeners to handle the toggle button click and apply the correct mode based on localStorage data.
CSS Styling: I made significant changes to the dark mode styling:
Defined custom CSS variables for dark mode colors, such as --dark-bg, --dark-text, and others to manage background, text, and container styles consistently.
Applied dark mode styles to various elements such as the page background, text, containers, and tiles.
Styled the toggle button with a hover effect to enhance user experience.
Reason for Using main.css: Although SCSS was initially considered for styling (due to its better code management with variables and nesting), I encountered issues where my SCSS changes were not rendering on the screen after compilation. As a workaround, I decided to directly edit the main.css file to apply the necessary styles for dark mode. This ensured that the styles rendered properly and provided a seamless dark mode experience for users.