SCSS to CSS Compiler · Tutorial
How to compile SCSS to CSS without installing Node
5 min readbeginnerUpdated
You may want plain CSS from an SCSS file without setting up Node.js or a build tool. You will compile a button stylesheet that uses variables, a mixin and a loop, and read the warning Sass gives.
What you need
- The SCSS to CSS Compiler
- An SCSS file, or the example button styles
Steps
Load the stylesheet
Press Try it to load the example: a button with brand colour variables, a focus-ring mixin, a map of sizes and an
@eachloop.Read the compiled CSS
Nesting is flattened into full selectors, variables are replaced by their values and the loop produces one rule per size.
.button--small { font-size: 0.875rem; }Check the warning
The message reports two warnings for line 18: global functions such as
darken()are being removed from Sass. The CSS is still produced. To clear the warnings, add@use "sass:color";at the top and writecolor.adjust($brand, $lightness: -8%)instead.Choose the output
Keep Readable to review the CSS, or switch Output to Minified and download it ready for your site.
Try it yourself
Opens the SCSS to CSS Compiler with this tutorial's sample loaded.
Common mistakes
- Importing your own partials
- Lines such as
@use "variables";fail here. Paste the partial's contents at the top instead. - Pasting LESS
- LESS uses
@for variables and is a different language. Sass variables start with$.
Next steps
Go back to the SCSS to CSS Compiler, or keep going with one of these: