lessc1
Compiler for less (leaner style sheets) extension for css
Overview
usage: lessc [option option=parameter ...] <source> [destination]
If source is set to `-' (dash or hyphen-minus), input is read from stdin.
options:
-
-h, --help -
Prints help (this message) and exit.
-
--include-path=PATHS -
Sets include paths. Separated by `:'. `;' also supported on windows.
-
-M, --depends -
Outputs a makefile import dependency list to stdout.
-
--no-color -
Disables colorized output.
-
--ie-compat -
Enables IE8 compatibility checks.
-
--js -
Enables inline JavaScript in less files
-
-l, --lint -
Syntax check only (lint).
-
-s, --silent -
Suppresses output of error messages.
-
--strict-imports -
Forces evaluation of imports.
-
--insecure -
Allows imports from insecure https hosts.
-
-v, --version -
Prints version number and exit.
-
--verbose -
Be verbose.
-
--source-map[=FILENAME] -
Outputs a v3 sourcemap to the filename (or output filename.map).
-
--source-map-rootpath=X -
Adds this path onto the sourcemap filename and less file paths.
-
--source-map-basepath=X -
Sets sourcemap base path, defaults to current working directory.
-
--source-map-include-source -
Puts the less files into the map instead of referencing them.
-
--source-map-inline -
Puts the map (and any less files) as a base64 data uri into the output css file.
-
--source-map-url=URL -
Sets a custom URL to map file, for sourceMappingURL comment in generated CSS file.
-
--source-map-no-annotation -
Excludes the sourceMappingURL comment from the output css file.
-
-rp, --rootpath=URL -
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|local|off
|
'all' rewrites all URLs, 'local' just those starting with a '.' |
-m=, --math=
always
|
Less will eagerly perform math operations always. |
|---|---|
parens-division
|
Math performed except for division (/) operator |
parens | strict
|
Math only performed inside parentheses |
strict-legacy
|
Parens required in very strict terms (legacy |
-
-su=on|off -
Allows mixed units, e.g. 1px+1em or 1px*1px which have units
-
--strict-units=on|off -
that cannot be represented.
-
--global-var='VAR=VALUE' -
Defines a variable that can be referenced by the file.
-
--modify-var='VAR=VALUE' -
Modifies a variable already declared in the file.
-
--url-args='QUERYSTRING' -
Adds params into url tokens (e.g. 42, cb=42 or 'a=1&b=2')
-
--plugin=PLUGIN=OPTIONS -
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-cssspecify options afterwards e.g.--plugin=less-plugin-clean-css="advanced" or--clean-css="advanced"
-------------------------- Deprecated ----------------
-
-sm=on|off -
Legacy parens-only math. Use
--math
--strict-math=on|off
-
--line-numbers=TYPE -
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.
-
-x, --compress -
Compresses output by removing some whitespaces. We recommend you use a dedicated minifer like less-plugin-clean-css
Releases
5 releases since Debian 9 (Stretch); the text changed 4 times.
--global-var since Debian 11 (Bullseye);
--ie-compat since Debian 11 (Bullseye);
--js since Debian 11 (Bullseye);
--modify-var since Debian 11 (Bullseye);
--plugin since Debian 11 (Bullseye);
--source-map-include-source since Debian 11 (Bullseye);
--source-map-inline since Debian 11 (Bullseye);
--source-map-no-annotation since Debian 11 (Bullseye);
--url-args since Debian 11 (Bullseye).
--clean-css until Debian 10 (Buster);
--clean-option until Debian 10 (Buster);
--no-ie-compat until Debian 10 (Buster);
--no-js until Debian 10 (Buster);
--relative-urls until Debian 10 (Buster);
--source-map-map-inline until Debian 10 (Buster);
--strict-math until Debian 10 (Buster);
-O0 until Debian 10 (Buster);
-O1 until Debian 10 (Buster);
-O2 until Debian 10 (Buster);
-ru until Debian 10 (Buster).