Dark Mode
ELI5 — The Vibe Check
The feature every user demands and every developer underestimates. 'Just make the background dark' they said. It'll be easy, they said. Then you discover that dark mode means rethinking every color, shadow, border, image, and icon in your entire app. Oh, and users want it to follow their system preference AND have a manual toggle.
Real Talk
Dark mode is a UI color scheme using light text on dark backgrounds. Implementation involves CSS custom properties for theming, prefers-color-scheme media query for system preference detection, and a toggle mechanism with persistence. Challenges include image contrast, shadow visibility, and ensuring sufficient color contrast ratios for accessibility.
Show Me The Code
/* CSS dark mode with system preference */
:root {
--bg: #ffffff;
--text: #1a1a1a;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #0a0a0a;
--text: #e5e5e5;
}
}
body {
background: var(--bg);
color: var(--text);
}
When You'll Hear This
"Does it support dark mode? — It's on the roadmap." / "Dark mode is a 2-day feature that takes 2 weeks."
Related Terms
Accessibility (a11y)
Accessibility (a11y) is making your website usable by everyone — including people using screen readers, keyboard-only navigation, or who have low vision.
CSS Variables
CSS Variables (officially called Custom Properties) let you store values in CSS and reuse them everywhere.
Responsive Design
Responsive design means your website looks good on EVERY screen size — from a tiny phone to a giant 4K monitor.
Tailwind
Tailwind is a CSS framework where instead of writing CSS files you add utility classes directly to your HTML.