- 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 - Cheatsheet
- Less - Useful Resources
- Less - Discussion
LESS - Import Options
In this chapter, we will understand the importance of Import Options in LESS. LESS offers the @import statement that allows the style sheets to import both LESS and CSS style sheets.
The following tables lists the import directives that will be implemented in the import statements.
| Sr.No. | Import options & Description |
|---|---|
| 1 |
reference
It uses a LESS file only as reference and will not output it. |
| 2 |
inline
It enables you to copy your CSS into the output without being processed. |
| 3 |
less
It will treat the imported file as the regular LESS file, despite whatever may be the file extension. |
| 4 |
css
It will treat the imported file as the regular CSS file, despite whatever may be the file extension. |
| 5 |
once
It will import the file only one time. |
| 6 |
multiple
It will import the file multiple times. |
| 7 |
optional
It continues compiling even though the file to import is not found. |
More than one keyword is allowed to use in the @import statement, however you have to use commas to seperate the keywords.
For instance −
@import (less, optional) "custom.css";