File tree Expand file tree Collapse file tree
task18-toggle-dark-light-mode Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Dark / Light Toggle Mode
2+
3+ ## ✅ Objective:
4+ Create a webpage that allows users to toggle between light and dark modes for specific sections of the page.
5+
6+ ## 💡 Concepts Practiced:
7+ - DOM manipulation using ` classList.toggle `
8+ - Event handling with ` addEventListener `
9+ - CSS transitions and styling
10+ - Responsive design using media queries
11+
12+ ## 📘 What I Learned:
13+ - How to switch CSS classes dynamically to implement light and dark modes.
14+ - How to update button text based on current mode.
15+ - How to make a webpage responsive across different devices.
16+ - Structuring sections independently so each side (light/dark) can be toggled separately.
17+
18+ ## ▶️ Example Flow:
19+ 1 . Open the webpage → two sections appear: Light and Dark.
20+ 2 . Click ** DARK** button on the Light section → section changes to dark mode and button text updates to LIGHT.
21+ 3 . Click ** LIGHT** button on the Dark section → section changes to light mode and button text updates to DARK.
22+ 4 . Resize the browser → layout adjusts for tablets and mobile screens automatically.
You can’t perform that action at this time.
0 commit comments