Trusted answers to developer questions

What is node-sass?

Free System Design Interview Course

Many candidates are rejected or down-leveled due to poor performance in their System Design Interview. Stand out in System Design Interviews and get hired in 2024 with this popular free course.

SASS (Syntactically Awesome Style Sheets) is an extended version of CSS. It enables a developer to create code in another language and translate it into CSS, and it compiles SASS to CSS at an incredible speed. It has introduced various new features like:

  • nesting
  • data variables
  • mixin functions
  • and many more!

Two syntaxes are available for SASS; the newer one uses the .scss extension and the older one uses the .sass extension.

Converting SASS into CSS

It is very easy to convert an scss file into a css file using this command on the terminal.

sass myStyle.scss myStyle.css

Remember: You need to install node-sass on your operating system.

Nesting

Nesting, where we can define CSS rules inside another rule, is introduced in this version.

Data Variables

Variables are also introduced for storing specific values. Variables are declared after the symbol.

Mixin functions

Mixin functions are used to store a certain set of reusable CSS rules.

Syntax

svg viewer

RELATED TAGS

web development
nodejs
css
sass
Copyright ©2024 Educative, Inc. All rights reserved
Did you find this helpful?