Step 1: Get Sass Running
Install Sass
Choose one method based on your OS:
npm (recommended for Node.js users):
macOS (Homebrew):
brew install sass/sass/sass
Windows (Chocolatey):
Standalone: Download from GitHub releases, extract, add to PATH.
Setup VS Code
- Install VS Code.
- Install Live Sass Compiler extension.
- Create
index.html and styles.scss.
- In VS Code, press
Ctrl+Shift+P > "Live Sass: Watch Sass".
Test It
// styles.scss
$primary: #333;
body {
color: $primary;
}
Compiles to CSS automatically.