Sass supports two syntaxes. This page compares SCSS and the indented syntax, shows how the same styles compile either way, and walks through five beginner examples.
01
SCSS
.scss
02
Indented
.sass
03
Same power
Equal features
04
Interoperable
Load each other
05
Choose
Team preference
06
Practice
5 examples
Concept
What Is Sass Syntax?
Official docs: Sass ships two ways to write the same language. Your team picks one (or mixes them). The compiler still outputs plain CSS either way.
SCSS — file extension .scss; braces and semicolons like CSS.
Feature set is the same: variables, nesting, mixins, modules, and more.
Each syntax can load the other (for example with @use).
💡
Beginner tip
Start with SCSS. You can paste most CSS into a .scss file and keep learning Sass features gradually. The rest of CodeToFun’s Sass tutorials use SCSS.
SCSS
📄 The SCSS Syntax
SCSS is a superset of CSS (with a few small exceptions). Essentially all valid CSS is valid SCSS. That similarity makes it the easiest syntax to learn and the most popular.
Official docs (Dart Sass 1.84.0+): in the indented syntax, a statement may span multiple lines when the break happens where the statement cannot end—inside parentheses or brackets, or between keywords in a Sass-specific @-rule.
LibSass and Ruby Sass do not support this. Many projects still run older Dart Sass (for example 1.69.x), where that multiline style will fail to compile. Prefer keeping indented statements on fewer lines, or use SCSS for long values, until your toolchain is on 1.84+.
Cheat Sheet
⚡ Quick Reference
Goal
SCSS
Indented
File extension
.scss
.sass
Nest a rule
&:hover { … }
&:hover then indent
End a declaration
color: red;
color: red
Compile
sass styles.scss styles.css
sass styles.sass styles.css
Load the other
@use "tokens"; works across extensions
Hands-On
Examples Gallery
Side-by-side where it helps. Open View Compiled CSS—both syntaxes produce the same CSS for equivalent source.
📚 Getting Started
Same styles, two spellings—identical CSS output.
Example 1 — Same Button in SCSS and Indented
Variables, nesting, and & work the same; only punctuation differs.
Legacy indented codebases — keep .sass or convert file by file.
Mixed repos — @use a .sass partial from SCSS (or the reverse).
Teaching — show both once, then standardize on one team style.
🧠 How Compilation Works
1
Pick a syntax
Write .scss (braces) or .sass (indentation).
Author
2
Parse by extension
Dart Sass chooses the parser from .scss vs .sass.
Parse
3
Shared features
Variables, nesting, mixins, modules resolve the same way.
Evaluate
4
✓
CSS out
Browsers only ever see standard CSS.
Watch Out
⚠️ Common Pitfalls
Wrong extension — SCSS in a .sass file (or the reverse) fails to parse.
Mixing braces into .sass — indented files do not use { } / ; the SCSS way.
Thinking features differ — syntax is style; capabilities match.
Multiline indented on old Dart Sass — needs 1.84+; older versions error.
Inconsistent team style — pick one primary syntax for new files.
Pro Tips
💡 Best Practices
✅ Do
Prefer SCSS for new learning and most teams
Match the file extension to the syntax you write
Document the team standard in the repo README
Reuse existing .sass files via @use instead of rewriting overnight
Keep indentation consistent (spaces) in indented files
❌ Don’t
Paste SCSS braces into a .sass file
Assume “Sass” always means the indented syntax
Force a full rewrite when interoperability already works
Rely on multiline indented statements before upgrading Dart Sass
Mix tab styles carelessly in indented projects
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about Sass syntax
Two spellings, one language, one CSS output.
5
Core concepts
📄01
.scss
CSS-like SCSS
Default
📝02
.sass
indented original
Classic
⚙️03
Same features
not two languages
Power
🔁04
Interoperable
load each other
Modules
✓05
Pick one
team consistency
Style
❓ Frequently Asked Questions
Two. SCSS uses the .scss extension and looks like CSS with braces and semicolons. The indented syntax uses .sass and uses indentation instead of braces and semicolons.
SCSS. Official docs call it the easiest to learn and the most popular because almost all valid CSS is valid SCSS.
No. Both support the same Sass features. Only the writing style differs (braces/semicolons vs indentation).
Yes. Official docs: each syntax can load the other (for example with @use), so teams can mix .scss and .sass files if needed.
Because it uses the .sass extension, people often just call it "Sass". SCSS is still Sass—it is the CSS-compatible syntax of the same language.
In Dart Sass 1.84+, yes—when line breaks occur where a statement cannot end (inside parentheses/brackets, or between keywords in Sass @-rules). Older compilers (including many 1.69.x installs) do not support that yet.
Did you know?
The name “SCSS” stands for Sassy CSS. It was added so developers could keep writing CSS-looking code while still using every Sass feature the indented syntax already had.
Sass offers SCSS for CSS-like writing and an indented .sass syntax for brace-free files. Features match; output is CSS either way—pick a team standard and stick with it.