css-custom-properties

Installation
SKILL.md

Use CSS custom properties for design tokens

Hard-coded color values and magic numbers scattered across CSS files make global changes (a rebrand, a dark mode, a spacing adjustment) require finding and updating dozens of individual lines. Custom properties centralize these values so one change propagates everywhere — and enable runtime theming that preprocessor variables cannot.

Quick Reference

  • Define reusable values as --variable-name on :root
  • Custom properties cascade and inherit — they can be overridden at any scope
  • Use var(--name, fallback) to provide fallback values
  • Custom properties are runtime values — JavaScript can read and write them

Check

Find hard-coded color values, spacing values, and font sizes in this CSS file that should be replaced with CSS custom properties.

Fix

Extract repeated and meaningful values into CSS custom properties on :root and replace all usages with var() references.

Installs
6
GitHub Stars
73.9K
First Seen
Jul 3, 2026
css-custom-properties — thedaviddias/front-end-checklist