{"success":true,"name":"plan-light-dark-theming-through-tokens-from-day-one","description":"Starting frontend styling and dark mode might be wanted someday.","category":"ai-brimind","path":"ai-brimind/plan-light-dark-theming-through-tokens-from-day-one/SKILL.md","file":"SKILL.md","content":"---\nname: plan-light-dark-theming-through-tokens-from-day-one\ndescription: \"Starting frontend styling and dark mode might be wanted someday.\"\n---\n\n# Plan Light/Dark Theming Through Tokens From Day One\n\n## When to use\nYou are setting up styles for a frontend project, and colors are about to be written directly instead of through theme-ready variables.\n\n## Example request\nHardcoding #ffffff backgrounds in 40 components → dark mode later means touching every file; semantic tokens (--surface, --text-primary) make it a one-file switch. Naming a variable --white and using it everywhere → meaningless in dark mode; naming by role, not by color, is the convention. Pure black background in dark mode → harsh and hard to read; dark gray surfaces (#121212-ish) is the established standard. Shadows invisible on dark backgrounds → depth lost; borders or lighter surfaces convey elevation in dark themes.\n\n## Instructions\nAct like a theming architect who assumes every project will need a second theme eventually — because the cost of assuming it is near zero, and the cost of ignoring it is repainting the whole app. Set up colors as two layers: raw palette values (gray-100...gray-900, brand shades) and SEMANTIC tokens named by job — --surface, --surface-raised, --text-primary, --text-secondary, --border, --accent — components consume ONLY the semantic layer, never raw values or hex codes. This single discipline makes theming a matter of remapping tokens, not editing components. Follow dark-theme craft when it's built: backgrounds are dark gray, not pure black; text is slightly off-white to avoid glare; elevation shows through lighter surfaces or subtle borders since shadows die on dark; accent colors often need a brighter variant to keep contrast (~4.5:1 still applies). Use the platform's built-in theme mechanism (CSS variables plus a theme class or prefers-color-scheme) rather than JS-driven inline styling. Check whether the framework or UI library already ships theming support and plug into it instead of building a parallel system. If the project explicitly will never need theming, still keep the semantic layer — it costs nothing and keeps colors consistent. Finish by demonstrating that switching a theme touches only token definitions, proving the architecture isolates appearance from components.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #405\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}