Home / Interview / Less :: General Questions

Interview :: Less

1) What is Less?

The Learner Style Sheet (Less) is a backward-compatible language that can be compiled into the Cascading Style Sheet (CSS) and runs on both the client side and server side. It is an open source language and cross-browser compatible.

2) When does the Less programming language first invented?

The Less programming language was first invented in 2009.

3) In which language does the Less first written?

The LESS was first written in Ruby in 2009.

4) is the current language used in Less?

Currently, Less is using JavaScript.

5) Who is the inventor of Less?

The Less is designed and developed by Alexis Sellier and Dmitry Fadeyev.

6) What is the extension of Less file?

The ".less" is the extension of the Less file. It is always required to use ".Less" extension in Less document file.

7) In how many ways we can use Less?

There are three ways to use Less:

  • Through the command line.
  • Through a third-party tool.
  • You can download Less as a script file for the browser.
8) How do you represent a variable in Less?

It is required to declare a variable with @ symbol and uses a colon (:) to assigned the particular value in the variable. It is also necessary to add a semi-colon (;) after the value of the variable.

For example:

In the above example of Less, the two variables used in the Less programming having values #FF7F50 and #800080.

9) What is the use of Mixins in Less?

In Less, Mixins facilitates you to add the set of properties from one rule-set into another rule-set. It includes class names as its properties. Mixins can be declared as the same way as CSS style using a class or id selector. It can store multiple values and can be reused in the code whenever necessary.


10) What is the role of nesting in Less programming?

The nesting is used to make the code simple, clean and Less complicated by allowing it to follow some visual hierarchy. For example nesting of classes can be done in Less programming.

For example:

In the above Less document example of nesting myclass is the subclass of container class.