Question · JavaScript and React course · Module 14: Advanced Styling
Tokens vs Hardcoded Values
What is the main problem with using hardcoded values (e.g., '#7c4dff') instead of design tokens in a large project?
Answer options
- Changing a color requires searching through the entire codebase and modifying it in many places
- Hardcoded values are slower to render
- Browsers do not support hardcoded hex colors
- Hardcoded values do not work in CSS Modules
You can check the correct answer by solving this task in the CodeWorlds game.