- Less Basic Tutorial
- Less - Home
- Less - Overview
- Less - Installation
- Language Features
- Less - Nested Rules
- Less - Nested Directives and Bubbling
- Less - Operations
- Less - Escaping
- Less - Functions
- Less - Namespaces and Accessors
- Less - Scope
- Less - Comments
- Less - Importing
- Less - Variables
- Less - Extend
- Less - Mixins
- Less - Parametric Mixins
- Less - Mixins as Functions
- Less - Passing Rulesets to Mixins
- Less - Import Directives
- Less - Import Options
- Less - Mixin Guards
- Less - CSS Guards
- Less - Loops
- Less - Merge
- Less - Parent Selectors
- Functions
- Less - Misc Functions
- Less - String Functions
- Less - List Functions
- Less - Math Functions
- Less - Type Functions
- Less - Color Defination Functions
- Less - Color Channel Functions
- Less - Color Operation
- Less - Color Blending Functions
- Usage
- Less - Command Line Usage
- Using Less In The Browser
- Less - Browser support
- Less - Plugins
- Less - Programmatic Usage
- Less - Online Compilers
- Less - GUIs
- Less - Editors and Plugins
- Less - Third Party Compilers
- Less - Frameworks
- Less Useful Resources
- Less - Quick Guide
- Less - Useful Resources
- Less - Discussion
LESS - Variables
In this chapter, we will discuss the Variables in LESS. LESS allows variables to be defined with an @ symbol. The Variable assignment is done with a colon(:).
The following table demonstrates the use of LESS variables in detail.
Sr.No. | Variables usage & Description |
---|---|
1 | Overview
Repetition of same value many times can be avoided by the use of variables. |
2 | Variable Interpolation
The variables can also be used in other places like selector names, property names, URLs and @import statements. |
3 | Variable Names
We can define variables with a variable name consisting of a value. |
4 | Lazy Loading
In lazy loading, variables can be used even when they are not. |
5 | Default Variables
Default variable has an ability to set a variable only when it is not already set. This feature is not required because variables can be easily overridden by defining them afterwards. |
Advertisements