What is LESS? 

LESS which is the acronym for Leaner Style Sheets but regularly referred to as LESS is a dynamic style sheet language preprocessor whose code can be compiled into Cascading Style Sheets (CSS) styles and executed on the server-side or on the client's browser. Developed by Alexis Sellier, LESS is greatly inspired by Sass and has further influenced the more recent "SCSS" syntax of Sass, which inherited its CSS-like block formatting syntax.

LESS is an open-source project. Its first version was developed with Ruby, but, in its succeding versions, the use of Ruby was removed and replaced by JavaScript. The syntax of Less which is indented is like a nested meta-language, as ‘legal’ CSS is a valid LESS code with the same semantics. LESS has the following mechanisms. variables, mixins, nesting, functions, and operators; the major distinction between LESS and other precompilers of CSS being is that Less allows you to compile your styles to regular CSS in real-time by means of less.js on the browser. 

Features of LESS

There are many features of LESS and some of them are:

1. Variables: Less allows developers to define variables. The variables in Less are declared with the “at” symbol (@). The assignment of variables is done using a colon (:). In the process of the translation, the values stored in the variables are inserted into the output CSS document.

2. Mixins: LESS Mixins allows you to join together all the properties of a class into another class by using the class name as one of its properties, therefore, making it act as a sort of constant or variable. They can also act as functions, and accept arguments. Regular CSS does not have support for Mixins: Any code that is repeated must be repeated in each location. LESS Mixins allow for a better, efficient and it provides a cleaner code repetition, as well as easier alteration of code.

3. Functions and operations: LESS provides various features for operations and functions. Operations in LESS allows you to carry out addition, subtraction, multiplication, and division of property colors and values, which can then be used to create very complex relationships between properties. Functions here map fewer codes one-to-one with JavaScript codes, allowing you to dynamically manipulate values.

4. LESS allows for a much cleaner and more readable code to be written in an organized way.

5. With LESS, you can define a style and it then re-use it throughout the code.

6. LESS is a superset of CSS that is based on javascript.

Benefits of LESS

There are many benefits of learning about LESS below are some of them are:

1. LESS is faster and easier.

2. LESS allows for a more cleaner code structure due to the use of Code Nesting.

3. Less codes are more simple and well organized as compared to regular CSS codes.

4. Less has supports for all popular browsers.

5. Modification/Updation can be achieved faster because of the use of LESS variables.

6. Less is time-saving as compared to regular CSS because you can create functions and reuse them.

7. Coding with LESS is faster because of the list of operators that it provides. 

 


Student Login

Login & Study At Your Pace
500+ Relevant Tech Courses
300,000+ Enrolled Students



86% Scholarship Offer!!

The Scholarship offer gives you opportunity to take our Course Programs and Certification valued at $50 USD for a reduced fee of $7 USD. - Offer Closes Soon!!

Copyrights © 2020. SIIT - Scholars International Institute of Technology. A Subsidiary of Scholars Global Tech. All Rights Reserved.