Skip to content

Commit 7ea003d

Browse files
authored
Create README.md
1 parent 03445ae commit 7ea003d

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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.

0 commit comments

Comments
 (0)