Banukobhan Nagendram
Banukobhan Nagendram

Reputation: 2597

Differences between SCSS and LESS

I have read about SCSS and LESS. But I can't understand the differences clearly. I know SCSS and LESS both have more functionality of CSS (I mean extension of CSS).

What is different between SCSS and LESS? Which one is better?

Upvotes: 61

Views: 64828

Answers (2)

Keir
Keir

Reputation: 870

Both Sass and Less are CSS preprocessors.

From keycdn.com

A CSS preprocessor is basically a scripting language that extends CSS and then compiles it into regular CSS.

So Sass and Less don't change the functionality of CSS, as they are compiled into plain old CSS. What they do is make it easier to write and maintain CSS with tools such as mixins, nesting, variables, and more.

SCSS, which stands for 'Sassy CSS' is one of two syntaxes for Sass.
From the sass reference:

The second and older syntax, known as the indented syntax (or sometimes just "Sass"), provides a more concise way of writing CSS.

The difference

Both Sass and Less have very similar features. There are syntactical differences, for example, Sass uses $ for variables whereas less uses @ .
There are some slightly more subjective differences, this website claims that "LESS Has More User-Friendly Documentation Than SCSS", however personally I have found the SCSS documentation and examples very easy to use.

Upvotes: 58

jrswgtr
jrswgtr

Reputation: 2379

SCSS and LESS are both "supersets" of vanilla CSS. That means valid CSS is automatically also valid SCSS and LESS, but not necessarily the other way around.

The difference between SCSS and LESS is that they have a different syntax. They mostly have the same functionalities.

Upvotes: 15

Related Questions