Coding task · HTML and CSS course · Module 7: SASS

Defining SASS Variables

SASS variables start with $. Define once, use everywhere: $gold: #D4AF37; Changing it in one place updates everything! It's like an Egyptian cartouche - one symbol, one meaning.

Task

Define: $primary: #2C3E50, $secondary: #D4AF37 (Egyptian gold), $accent: #E74C3C. Use them in .header { background: $primary }, .title { color: $secondary }, .button { background: $accent }. Change $primary and see what happens!