Less
Less (Leaner Style Sheets) is a CSS preprocessor that extends CSS with variables, nesting, mixins, functions and operations. It uses a CSS-like syntax with curly braces and semicolons, so every valid CSS stylesheet is also valid Less.
Demo
Usage
Less code added to the style editor is compiled to CSS before being added to the result page.
Less uses a CSS-like syntax with curly braces and semicolons. Variables are prefixed with @, and mixins let you reuse groups of declarations.
For more details about CSS support in LiveCodes, including CSS processors, style imports, CSS modules, and CSS frameworks, see the CSS feature documentation.
Loading External Styles
Less supports importing external stylesheets using the @import rule. Bare module specifiers are resolved to full CDN URLs.
@import 'bootstrap/less/bootstrap';
For more information about loading and importing styles, see the Style Imports documentation.
Language Info
Name
less
Extensions
.less
Editor
style
Compiler
Less is compiled using the official Less.js compiler (running in the browser).
Custom Settings
Custom settings added to the property less are passed as a JSON object to the Less compiler during compile. Please check the Less options documentation for full reference.
Please note that custom settings should be valid JSON (i.e. functions are not allowed).
Example:
{
"less": {
"math": "strict"
}
}
Code Formatting
Using Prettier.