Google News
logo
Less Interview Questions
LESS (Learner Style Sheet) is dynamic style sheet producing language. LESS is a CSS pre-processors and extends CSS with dynamic behaviour. It allows for variables, mixins, operations and functions. LESS runs on server side and client side both.
The Less programming language was first invented in 2009.
Less was implemented into JavaScript Language.
There are following features of Less :
 
* It is based on JavaScript and CSS.
* It sorts the code redundancy.
* We can define style and it is reusable.
* It is easy to readable code and written in organized way.
The ".less" is the extension of the Less file. It is always required to use ".Less" extension in Less document file.
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.
 
If you run LESS.js in an HTML5 browser, it will use local storage to cache the generated CSS. However, from the developer point of view they cannot see the changes they made instantly. In order to see your changes instantly, you can load program in development and watch mode by following JavaScript
 
<script type= "text/javascript">
   less.env = "development " ;
   less.watch () ;
</script>

 

In CSS, Data URI's is one of the best technique, it allows developers to avoid external image referencing and instead embed them directly into a stylesheet. Data URIs are the excellent way to reduce HTTP requests.
The "Source Map Less Inline" option indicates that we should include all of the CSS files into the sourcemap. Which means that you only need your map file to get to your original source.
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 :
@primarycolor: #FF7F50;  
@color:#800080;  
h1 {  
   color: @primarycolor;  
}  
  
h3 {  
   color: @color;  
} 
 
In the above example of Less, the two variables used in the Less programming having values #FF7F50 and #800080.