+1 vote
in CSS by
What is a CSS Preprocessor? What are Sass, Less, and Stylus? Why do people use them?

1 Answer

0 votes
by

A CSS Preprocessor is a tool used to extend the basic functionality of default vanilla CSS through its own scripting language. It helps us to use complex logical syntax like – variables, functions, mixins, code nesting, and inheritance to name a few, supercharging your vanilla CSS.

SASS: Sass is the acronym for “Syntactically Awesome Style Sheets”. SASS can be written in two different syntaxes using SASS or SCSS

SASS vs SCSS

  1. SASS is based on indentation and SCSS(Sassy CSS) is not.
  2. SASS uses .sass extension while SCSS uses .scss extension.
  3. SASS doesn’t use curly brackets or semicolons. SCSS uses it, just like the CSS.
LESS: LESS is an acronym for “Leaner Stylesheets”. LESS is easy to add to any javascript projects by using NPM or less.js file. It uses the extension .less.
LESS syntax is the same as the SCSS with some exceptions. LESS uses @ to define the variables.

Related questions

0 votes
asked Feb 15, 2020 in JAVA by rahuljain1
+1 vote
asked Jul 6, 2021 in CSS by rajeshsharma
...