Scroll to navigation

LESSC(1) User Commands LESSC(1)


lessc - Compiler for Less (Leaner Style Sheets) extension for CSS


usage: lessc [option option=parameter ...] <source> [destination]

If source is set to `-' (dash or hyphen-minus), input is read from stdin.


Prints help (this message) and exit.
Sets include paths. Separated by `:'. `;' also supported on windows.
Outputs a makefile import dependency list to stdout.
Disables colorized output.
Enables IE8 compatibility checks.
Enables inline JavaScript in less files
Syntax check only (lint).
Suppresses output of error messages.
Forces evaluation of imports.
Allows imports from insecure https hosts.
Prints version number and exit.
Be verbose.
Outputs a v3 sourcemap to the filename (or output
Adds this path onto the sourcemap filename and less file paths.
Sets sourcemap base path, defaults to current working directory.
Puts the less files into the map instead of referencing them.
Puts the map (and any less files) as a base64 data uri into the output css file.
Sets a custom URL to map file, for sourceMappingURL comment in generated CSS file.
Excludes the sourceMappingURL comment from the output css file.
Sets rootpath for url rewriting in relative imports and urls Works with or without the relative-urls option.
Rewrites URLs to make them relative to the base less file.
'all' rewrites all URLs, 'local' just those starting with a '.'

-m=, --math=

Less will eagerly perform math operations always.
Math performed except for division (/) operator
Math only performed inside parentheses
Parens required in very strict terms (legacy --strict-math)
Allows mixed units, e.g. 1px+1em or 1px*1px which have units
that cannot be represented.
Defines a variable that can be referenced by the file.
Modifies a variable already declared in the file.
Adds params into url tokens (e.g. 42, cb=42 or 'a=1&b=2')
Loads a plugin. You can also omit the --plugin= if the plugin begins less-plugin. E.g. the clean css plugin is called less-plugin-clean-css once installed (npm install less-plugin-clean-css), use either with --plugin=less-plugin-clean-css or just --clean-css specify options afterwards e.g. --plugin=less-plugin-clean-css="advanced" or --clean-css="advanced"

-------------------------- Deprecated ----------------

Legacy parens-only math. Use --math


Outputs filename and line numbers. TYPE can be either 'comments', which will output the debug info within comments, 'mediaquery' that will output the information within a fake media query which is compatible with the SASS format, and 'all' which will do both.
Compresses output by removing some whitespaces. We recommend you use a dedicated minifer like less-plugin-clean-css


Report bugs to:
Home page: <>


The full documentation for lessc is maintained as a Texinfo manual. If the info and lessc programs are properly installed at your site, the command

info lessc

should give you access to the complete manual.

November 2022 lessc 3.12.2 (Less Compiler) [JavaScript]