Lesson 40 of 50
cssCSS Pre‑processors – Sass & Less
10 mins
Course progress80%
What you'll learn
Keep these ideas in mind as you work through the lesson.
Lesson 40 of 50
css10 mins
Keep these ideas in mind as you work through the lesson.
Pre‑processors add variables, nesting, mixins, and functions.
.scss):$primary:#0066cc;
.btn { background:$primary; &:hover { background:darken($primary,10%); } }
@ for variables.// _variables.scss
$font-stack: 'Roboto', sans-serif;
$spacing: 1rem;
// _buttons.scss
@use 'variables' as *;
.button { font-family:$font-stack; padding:$spacing; }
Compile to style.css for production.