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

Steps

  1. 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 @each loop.

  2. 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;
    }
  3. 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 write color.adjust($brand, $lightness: -8%) instead.

  4. 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.

Try it now

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: