Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
frontend ruleP2stack specificStack: css
cssdesign-systemnamingcolors
Name custom color tokens using a canonical color-naming reference
When adding a new color to a design-system palette, derive its token name from a consistent color-naming reference instead of inventing ad-hoc names.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codescss
| 1 | $palette: ( |
| 2 | pink-red: #fd0014, |
| 3 | some-grey: #4f4f4f, |
| 4 | ); |
Explanation (EN)
Objašnjenje (HR)
Good example
New codescss
| 1 | // Derived from a canonical color-naming tool (e.g. Name That Color) |
| 2 | $palette: ( |
| 3 | torch-red: #fd0014, |
| 4 | matterhorn: #4f4f4f, |
| 5 | ); |
Explanation (EN)
Objašnjenje (HR)