SASS: Toggles HW
Popcorn Hack: Fill in the Blanks
- The checkbox on a toggle keeps track of whether it is on or off.
- The slider is the visible part of the toggle that changes color when it is turned on.
- The
.switchclass controls the toggle’s position, size, padding, and alignment. - The border-radius property makes the slider have rounded edges.
- The
&:beforerule controls the white circle of the toggle.
Homework Hack: Interactive Settings Panel
This solution uses three labeled OCS toggles. Each toggle controls a real page feature, and the status panel updates the number of toggles currently turned on.
Display Preferences
Use these switches to change page preferences.
Toggles currently on:
🔔 Alerts are enabled.
Focus Mode: Extra distractions are hidden so you can concentrate.
💡 Study Tip: Break a large task into smaller steps.