refactor: consolideer kleurconstanten via CSS custom properties #72
Labels
No labels
blocked
bug
design
documentation
duplicate
enhancement
future
good first issue
help wanted
invalid
question
refactoring
tracker
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jelmer/topoquiz#72
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Probleem
Kleurconstanten zijn verspreid:
#c07000(highlight oranje) verschijnt inPROV_HIGHLIGHT,WATER_HIGHLIGHT,COUNTRY_HIGHLIGHTén in CSS#58CC02(mastered groen) staat op 5+ plekken#1b5e20(mastered donkergroen),#3b82f6(default blauw) idemBij een redesign moet je overal zoeken.
Oplossing
CSS custom properties als enkele bron van waarheid:
JS-stijlconstanten lezen de waarden via
getComputedStyle(document.documentElement), of definieer ze parallel als JS-constanten naast de CSS en gebruik de JS-constanten in de Leaflet-styles.Impact
Risico
Laag — geen functionaliteitswijziging. Visuele regressie is het enige risico; gebruik Playwright screenshot-vergelijking als check.
Zie REFACTORING.md voorstel #8
Geïmplementeerd in refactor-commit
96e1a18.