Install official Dart Sass, verify the CLI, and compile your first .scss file to CSS. This page covers npm, package managers, standalone binaries, watch mode, and five practical examples.
01
Dart Sass
Official compiler
02
npm / brew
Common installs
03
Verify
sass --version
04
Compile
SCSS → CSS
05
Watch
Auto-rebuild
06
Practice
5 examples
Concept
Why Install Sass?
Browsers understand CSS, not SCSS. A Sass compiler reads your .scss or .sass source and writes standard CSS. You install that compiler once, then run it from the terminal, a GUI app, or your build tool (Vite, Webpack, Parcel, and others often compile SCSS for you).
Dart Sass is the primary, actively maintained implementation.
The sass command compiles files and can watch for changes.
GUI apps (for example CodeKit, Prepros) wrap the same idea with a visual UI.
If you already use Node.js, start with npm install -g sass, run sass --version, then compile one small file. You can swap to a faster install later without changing your commands.
Paths
🚀 Choose an Install Path
If you…
Try
Use Node.js / npm
npm install -g sass or a project devDependency
Want maximum speed on desktop OS
sass-embedded (Node) or standalone / Homebrew / Chocolatey Dart Sass
Prefer no Node
Standalone ZIP/tarball from GitHub releases + PATH
Use Homebrew (macOS/Linux)
brew install sass/sass/sass
Use Chocolatey (Windows)
choco install sass
Want a GUI
Apps such as CodeKit (Mac) or Prepros (Mac/Windows/Linux)
Node.js
📦 Install with npm
Official docs: the Sass team maintains two Node packages that share the standard JavaScript API.
sass — pure JavaScript; a bit slower; works everywhere Node works.
sass-embedded — JS API around the Dart VM; faster; Windows, macOS, Linux.
terminal
# Global CLI (pure JS implementation)
npm install -g sass
# Or project-local (recommended for teams)
npm install --save-dev sass
# Faster alternative where supported
npm install --save-dev sass-embedded
More Options
💻 Standalone, Homebrew & Chocolatey
Standalone: download the OS/CPU package from the Dart Sass GitHub releases, extract the dart-sass folder, and add it to your system PATH. No other dependencies are required (sass.bat on Windows, sass on macOS/Linux).
terminal
# macOS / Linux (Homebrew)
brew install sass/sass/sass
# Windows (Chocolatey)
choco install sass
Community wrappers also exist for Java/Gradle/Maven and other ecosystems—see the official install page when you need those.
CLI
✅ Verify & First Compile
After install, confirm the executable works, then compile SCSS to CSS:
terminal
sass --version
sass --help
# Compile one file
sass source/stylesheets/index.scss build/stylesheets/index.css
# Or a simple local pair
sass styles.scss styles.css
sass --version should print a Dart Sass version string (for example 1.69.5 compiled with dart2js …). If the command is not found, fix PATH or use npx sass for a project-local install.
Cheat Sheet
⚡ Quick Reference
Goal
Command
Global npm CLI
npm install -g sass
Project npm
npm install -D sass
Check install
sass --version
Compile once
sass styles.scss styles.css
Watch
sass --watch styles.scss:styles.css
Compressed CSS
sass --style=compressed styles.scss styles.css
No source map
sass --no-source-map styles.scss styles.css
Hands-On
Examples Gallery
Commands you will use on day one, plus a tiny stylesheet that compiles to verified CSS.
📚 Getting Started
Install, verify, and compile your first file.
Example 1 — Install the CLI with npm
Global for quick experiments, or local so every teammate shares the same version.
terminal
# Anywhere on your machine
npm install -g sass
# Inside a project (package.json)
npm install --save-dev sass
npx sass --version
📤 What success looks like:
# npm finishes without errors, then:
npx sass --version
# prints something like:
1.69.5 compiled with dart2js 3.1.5
How It Works
Global installs put sass on your PATH. Local installs keep the version in package.json; call it with npx sass or an npm script.
Example 2 — Confirm the Install
Always check version and help before debugging “command not found.”
terminal
sass --version
sass --help
📤 Sample output:
1.69.5 compiled with dart2js 3.1.5
# --help lists flags such as --watch, --style, --no-source-map
How It Works
A version line means the executable is reachable. Official docs recommend this check right after install.
Commit huge generated CSS without a clear build step
Mix Ruby Sass docs with modern Dart Sass commands
Hand-edit output CSS as your source of truth
Skip sass --version after a fresh install
Assume the browser can load .scss directly
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about Sass installation
Install Dart Sass, verify, compile, watch, then learn the language.
5
Core concepts
📦01
Dart Sass
official choice
Core
💻02
Many installs
npm / brew / zip
Setup
✅03
--version
prove it works
Verify
⚙️04
sass in out
SCSS → CSS
CLI
👀05
--watch
dev loop
Workflow
❓ Frequently Asked Questions
Dart Sass—the primary implementation. Install the CLI (standalone, npm, Homebrew, or Chocolatey) or a Node package (sass or sass-embedded). Avoid starting new work on LibSass or Ruby Sass.
Global CLI: npm install -g sass. Project-local: npm install --save-dev sass. Then run sass --version (or npx sass --version for a local install).
The npm sass package is pure JavaScript and a bit slower. sass-embedded wraps the Dart VM and is faster on Windows, macOS, and Linux. The CLI interface is the same.
After installing, run: sass source.scss dest.css. Example: sass styles.scss styles.css. Use sass --watch styles.scss:styles.css to recompile on save.
No. Browsers load CSS. You compile .scss or .sass to .css in development or CI, then link the CSS from HTML.
Both are maintained by the Sass team and share the JS API. sass is pure JS (widest platform support). sass-embedded is faster but targets Windows, macOS, and Linux via the Dart VM.
Did you know?
Official install docs note that the npm sass package is a pure JavaScript build of Dart Sass. It is a little slower than native/embedded options, but the commands stay the same—so beginners can start with npm and upgrade for speed later.
Install Dart Sass with the method that fits your machine, verify with sass --version, then compile (and watch) SCSS into CSS. Once that loop works, you are ready to learn the language features.