Dark Mode with CSS Variables and light-dark()
Good dark mode isn't just inverted colours. It needs its own palette, respects the user's system setting, and lets them override it. 1. Use semantic colour variables :root { --bg: #ffffff; --surface: #f8fafc; --text: #0f172a; --muted: #64748b; --brand: #0d9488...