How are nested SCSS rules indented?
Each level of nesting adds one indent (2 spaces by default — the dominant SCSS convention used by Bootstrap, Bulma, and most design systems). The opening brace stays on the selector line, the body indents one level, and the closing brace returns to the parent indent. This matches Prettier and stylelint defaults. Avoid nesting more than 3-4 levels deep — it makes the output CSS unreadable and breaks the BEM convention.
How are $variables formatted?
SCSS $variables are declared one per line with a space after the colon: $primary: #3b82f6;. Group related variables (colors, typography, spacing, breakpoints) and separate groups with a blank line. Modern Sass favours @use with namespace prefixes (e.g., @use "colors"; .x { color: colors.$primary; }) over global $variables — the formatter preserves whichever convention you use.
How are @mixin and @include formatted?
@mixin definitions follow the same brace-and-indent rule as selectors: @mixin button($color) { ... }. @include calls fit on one line if short (@include button(red);), or wrap arguments across multiple lines if they exceed the column limit. Mixins with @content blocks use a trailing block: @include media-query(md) { font-size: 1.25rem; }. The formatter preserves all three forms.
Should I use @use or @import?
@use is the modern syntax — Dart Sass deprecated @import in 2021 and will remove it. @use creates a namespace (use "colors" makes variables available as colors.$primary), prevents global pollution, and runs each file once. The formatter preserves whichever you use, but new projects should adopt @use exclusively. Run sass-migrator import to convert legacy @import to @use.
Does formatting SCSS change the compiled CSS?
No. Formatting only changes whitespace in the SCSS source. dart-sass produces byte-identical CSS output from formatted and unformatted input — variables, nesting, mixins, @use, @forward, and @extend resolve identically regardless of source whitespace.
How are parent-selector references (&) formatted?
& references stay on a new indented line under the parent selector. Common patterns: &:hover, &.active, &--modifier (BEM), and trailing patterns like .parent &. The formatter never inlines & references on the same line as the parent — keeping them as separate nested rules makes the structure clearer to read.
Is the SCSS I paste sent to your servers?
No. Formatting runs entirely in your browser using JavaScript. Stylesheets containing internal design-token names, brand colors, or proprietary class structures never leave your device. Open DevTools → Network and click Format to verify.
Should I use SCSS or CSS Nesting in 2026?
Native CSS Nesting is now supported in all evergreen browsers (Chrome 120+, Firefox 117+, Safari 16.5+) — for many projects, you no longer need a preprocessor. SCSS still wins when you need @mixin (CSS has no equivalent), @function, math operations, or @use for module organisation. New projects with simple nesting can use plain CSS; design systems and large codebases still benefit from SCSS.