LESS - Features Overview



LESS is a CSS preprocessor which provides dynamic style sheet with many features of dynamic programming language and allows reusing CSS code and writing LESS code with same semantics.

LESS is super set of CSS which provides many features as listed in the below table −

Sr.No. Features & Description
1 Variables

It specifies a value in single place which can be used throughout the style sheet.

2 Mixins

It is a group of CSS properties which allows using properties of one class into another class.

3 Nested Rules

It is used to nest the selector inside another selector.

4 Nested Directives and Bubbling

You can nest the directives such as media and keyframe in the same manner how you will nest the selectors.

5 Operations

LESS supports some arithmetical operations such as plus (+), minus (-), multiplication (*) and division (/) and they can operate on any number, color or variable.

6 Escaping

It builds selectors dynamically and uses property or variable value as arbitrary string.

7 Functions

LESS maps JavaScript code with manipulation of values and uses predefined functions to manipulate HTML elements aspects in the style sheet.

8 Namespaces and Accessors

It is used to group the mixins under common name.

9 Scope

Variable scope specifies place of the available variable.

10 Comments

Comments makes code clear and allows users to understand easily.

11 Importing

It is used to import the contents of the LESS or CSS files.

Advertisements