.Net Interview Questions and Answers

Search:

What is the need of less.js ?( Javascript interview questions)

By : Shiv Prasad Koirala | Aug 11th, 2014 | Views : 3522 | Comments : 0 Bookmark and Share

English meaning of LESS means minimizing something. LESS.JS simplifies your CSS by adding extra capabilities to CSS like variables, mixin's etc. LESS.JS makes your CSS dynamic. LESS extends your CSS and simplifies your CSS.



For example below is a simple CSS which has two styles "style1" and "style2". If you notice the below CSS the background color is duplicated. If we ever want to change this we have to change in multiple places.




But if use "LESS.JS" we can create a variable which has color stored and set the CSS property using the variable. If we ever want to change the color we just need to change the variable value.


Below is a simple LESS enabled CSS where we have created a variable "mybackgroundcolor" which is set at the top and that variable is then used to set the background color property in the CSS. This makes our CSS dynamic and easy to maintain.



Before running the above code ensure that you have link to less.js file at the top. You can get less JS file from lesscss.org.



Below is a video created by questpond.com team which explain LESS practically.



If you are looking to get trained on MVC , JSON , Angular , Less click here.

 
Rate this Article :
1 Star
2 Stars
3 Stars
4 Stars
5 Stars
1 1 1 2 1
 
 
 
 

.NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala

In this article we will explain .NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala.... Read More

What is the difference between Stored Procedures and Function (SQL Server interview question with answers)?

In this article we will explain what is the difference between Stored Procedures and Function.For more articles and videos visit us on www.questpond.com... Read More

Explain MVC application life cycle?

In this article we will explain MVC application life cycle.For more articles and videos visit us on www.questpond.com... Read More

C# Design pattern interview questions with answers: - How Singleton is different from Static class?

In this article we will explain How Singleton is different from Static class.... Read More

WCF interview questions and answers: - What is the difference between Service endpoint and Client endpoint?

In this article we will explain What is the difference between Service endpoint and Client endpoint.... Read More

.NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala

In this article we will explain .NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala.... Read More

What is the difference between Stored Procedures and Function (SQL Server interview question with answers)?

In this article we will explain what is the difference between Stored Procedures and Function.For more articles and videos visit us on www.questpond.com... Read More

Explain MVC application life cycle?

In this article we will explain MVC application life cycle.For more articles and videos visit us on www.questpond.com... Read More

C# Design pattern interview questions with answers: - How Singleton is different from Static class?

In this article we will explain How Singleton is different from Static class.... Read More

WCF interview questions and answers: - What is the difference between Service endpoint and Client endpoint?

In this article we will explain What is the difference between Service endpoint and Client endpoint.... Read More

Article Categories

Learn in Hindi