015
LVL 01 — WAVE DEFENDER SESSION 015 DAY 15

SETTINGS CONTROLS

🎫 PIXELCRAFT-005
🎨 Design | 🟢 Beginner | Priority: 🟡 Medium

The settings panel has inputs but they're unstyled — default browser range sliders, no alignment, no grouping. Style the filter controls to match the design system. Add proper control groups for each filter.
CONCEPTS.UNLOCKED
🎚
Styling Form Elements
Range inputs, number inputs, select dropdowns, checkboxes — each browser styles them differently. -webkit-appearance: none strips the default so you can rebuild from scratch.
🎨
Custom Range Slider
Strip the browser default, then style the track (the bar) and thumb (the draggable circle) separately using vendor-specific pseudo-elements.
CSS Specificity
When two rules conflict, which wins? Inline > ID > Class > Element. Specificity is a scoring system: higher score overrides lower score. !important overrides everything (avoid it).
CSS Inheritance
Some properties inherit from parent to child: color, font, line-height. Others don't: margin, padding, border, background. Set font on body → all text inherits it.
📏
CSS Units
px (absolute), % (relative to parent), em (relative to parent font size), rem (relative to root font size), vh/vw (viewport height/width).
--
CSS Custom Properties & Pseudo-elements
Variables: --accent-color: #00b4d8; then var(--accent-color) everywhere. Pseudo-elements: ::before and ::after add visual elements without HTML.
HANDS-ON.TASKS
01
Style the Filter Controls
.filter-group { display: grid; grid-template-columns: 80px 1fr 40px; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #2a2a4a; } .filter-group label { font-size: 12px; color: #a0a0b0; } .filter-group span { text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; /* Fixed-width numbers so "100" and "8" take the same width — no jittering */ }
02
Custom Range Slider

Strip the browser default and rebuild:

input[type="range"] { -webkit-appearance: none; appearance: none; background: #2a2a4a; height: 4px; border-radius: 2px; outline: none; } input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--accent-color, #00b4d8); cursor: pointer; }
Browsers use different pseudo-elements: ::-webkit-slider-thumb (Chrome/Safari/Edge) and ::-moz-range-thumb (Firefox). You need both for cross-browser support.
03
Implement CSS Variables for Theming

Define the entire color system in :root:

:root { --bg-primary: #0a0a1a; --bg-secondary: #1a1a2e; --bg-tertiary: #16213e; --text-primary: #e0e0e0; --text-secondary: #a0a0b0; --accent: #00b4d8; --border: #2a2a4a; --radius: 6px; }

Then use everywhere:

background-color: var(--bg-secondary);
Change --accent to #ff6b6b (coral) — watch every accent element update instantly. One source of truth for every color. This is design system thinking.
04
Learn Specificity by Example

Create a specificity conflict and resolve it:

/* Rule 1: class selector — specificity 0,0,1,0 */ .tool-btn { color: red; } /* Rule 2: id selector — specificity 0,1,0,0 */ #upload-btn { color: blue; } /* Rule 3: element selector — specificity 0,0,0,1 */ button { color: green; } /* Which color wins for #upload-btn? → BLUE (highest specificity) */
SelectorScoreExample
Element0,0,0,1button
Class0,0,1,0.tool-btn
ID0,1,0,0#upload-btn
Inline1,0,0,0style="..."
05
Style the "Reset All" Button

Style it with an accent color and hover state:

.reset-btn { width: 100%; padding: 8px; margin-top: 16px; background-color: transparent; color: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius); cursor: pointer; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; transition: all 0.2s ease; } .reset-btn:hover { background-color: var(--accent); color: var(--bg-primary); }
The transition property animates the change smoothly. Without it, the hover flips instantly. With it, the colors fade over 0.2 seconds.
06
Close the Ticket
git switch -c design/PIXELCRAFT-005-settings-controls git add src/styles/ git commit -m "Style settings controls and implement CSS variables (PIXELCRAFT-005)" git push origin design/PIXELCRAFT-005-settings-controls # PR → Review → Merge → Close ticket ✅
CS.DEEP-DIVE

CSS Custom Properties are a form of indirection.

Instead of hardcoding a value, you reference a name that resolves to a value. Indirection is perhaps THE most powerful concept in CS.

// Indirection appears everywhere:

Variables       → name → value
Pointers        → address → data
DNS             → domain name → IP address
Virtual memory  → virtual addr → physical addr
Interfaces      → method name → implementation

// "All problems in computer science can be
// solved by another level of indirection."
// — David Wheeler

// CSS variables let you change your entire
// theme by editing one value. That's indirection.
"Theme Switcher"
[A] Create 3 complete color themes using CSS variables: Dark (current), Light, and High Contrast. Each theme overrides the :root variables.
[B] Style a custom checkbox and a custom select dropdown from scratch using -webkit-appearance: none and pseudo-elements (::before, ::after).
[C] Add a ::before pseudo-element to each filter group showing a colored dot that matches the filter's current intensity.
REF.MATERIAL
ARTICLE
Mozilla Developer Network
Official guide to CSS variables: declaring, using, scoping, fallbacks, and JavaScript access. The complete reference.
CSS VARIABLESMDNREFERENCE
VIDEO
Kevin Powell
Clear visual explanation of the specificity scoring system with real-world examples of conflict resolution.
SPECIFICITYCASCADE
TOOL
Keegan Street
Paste any CSS selector and see its specificity score visualized. Useful when debugging why a style isn't applying.
SPECIFICITYDEBUGGING
VIDEO
Kevin Powell
Complete walkthrough of custom range slider styling for Chrome, Firefox, and Safari — track and thumb pseudo-elements.
RANGE INPUTCROSS-BROWSER
ARTICLE
Mozilla Developer Network
::before, ::after, ::placeholder, ::selection — all CSS pseudo-elements explained with examples.
PSEUDO-ELEMENTSREFERENCE
// LEAVE EXCITED BECAUSE
The settings panel looks polished — custom sliders, proper alignment, consistent theme using CSS variables. Change ONE variable → the entire app's accent color changes. This is real design system thinking.