Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Differences between SCSS and LESS

Tags:

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?

like image 711
Banukobhan Nagendram Avatar asked Aug 24 '18 11:08

Banukobhan Nagendram


People also ask

What is CSS LESS and SCSS?

For web designers or developers, that debate is Sass or LESS. Syntactically Awesome Stylesheets (Sass) and Leaner CSS (LESS) are both CSS preprocessors. They are special stylesheet extensions that make designing easier and more efficient. Both Sass and LESS compile into CSS stylesheets so that browsers can read them.

Which one is better Sass or LESS?

Slightly longer answer: Sass is better on a whole bunch of different fronts, but if you are already happy in Less, that's cool, at least you are doing yourself a favor by preprocessing. Much longer answer: Read on.

What are the similarities and differences between CSS LESS and Sass?

This stylesheet language is strongly oriented around CSS and resembles SCSS in its syntax. Both preprocessors share some of the same properties: Both SASS and LESS allow for the use of mixins and variables. One difference, though, is that SASS is based on Ruby, while LESS uses JavaScript.

What is the difference between CSS and LESS?

CSS and LESS are not completely different, but LESS does offer additional features that make your projects easier. More than that, the compiled version of LESS is actual CSS.


2 Answers

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. Sass uses Ruby whereas Less uses Javascript. 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 Sass", however personally I have found the Sass documentation and examples very easy to use.

like image 66
Keir Avatar answered Nov 02 '22 23:11

Keir


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.

You can read more about SCSS and LESS here.

like image 38
jrswgtr Avatar answered Nov 03 '22 00:11

jrswgtr