An alternative LESS compiler with no setup. Uses the official node.js based LESS compiler under the hood with AutoPrefixer and CSSComb built in.
- Less (which stands for Leaner Style Sheets) is a backwards-compatible language extension for CSS. This is the official documentation for Less, the language and Less.js, the JavaScript tool that converts your Less styles to CSS styles. Because Less looks just like CSS, learning it is a breeze.
- More Mac apps Crunch. Crunch is a great looking LESS editor and compiler built on Adobe Air. Created by the same guy as the unofficial Mac app, CodeKit is a Mac app that compiles LESS, SASS, Stylus, and CoffeeScript. Mac, Linux, and PC app for drag and drop compiling of LESS files. Plus, the source code is on GitHub.
See the change log for changes and road map.
Saving the LESS file will then compile into CSS. The automatic compilation doesn't happen if: The project hasn't been enabled for LESS compilation; The.less file name starts with an underscore; The.less file isn't part of any project; A comment in the.less file with the word no-compile is found. CSS CSS Reference CSS Browser Support CSS Selector Reference Bootstrap 3 Reference Bootstrap 4 Reference W3.CSS Reference Icon Reference Sass Reference. There are many applications that will get you up and running with Sass in a few minutes for Mac, Windows, and Linux. Some of these are free, but some are paid apps.
Features
- Compiles .less files on save
- Uses the official LESS node module
- Automatially runs autoprefix
- Support for CSSComb
- All compiler options configurable
- Minification support
Compile on save
All .less files will automatically be compiled into a .css file nested under it in Solution Explorer after being enabled on the project.
By default, compilation is off and that's indicated by a watermark at the bottom right corner of any LESS file.
To enable LESS compilation, simply click the watermark and it changes to indicate LESS compilation is 'on'.
For files that are being ignored, the watermark looks like this:
All
.less
files in the following folders are ignored from compilation:- node_modules
- bower_components
- jspm_packages
- lib
- vendor
You can stil reference these files from your own
.less
files, but they will not be compiled themselves.Saving the LESS file will then compile into CSS.
The automatic compilation doesn't happen if:
- The project hasn't been enabled for LESS compilation
- The .less file name starts with an underscore
- The .less file isn't part of any project
- A comment in the .less file with the word
no-compile
is found
The Output Window shows details about what is being executed to make it easy to troubleshoot any issues.
Note that the the solution (.sln) file is updated to reflect that LESS compilation is enabled. Remember to save the solution when prompted to persits the information.
Compile all .less files
The solution node in Solution Explorer has a command to compile all
.less
files in the projects enabled.Compiler options
You can set any compiler options as defined on the LESS compiler website inside a comment in the
.less
file. The comment is prefixed with lessc
followed by the compiler options.The default less compiler arguments are:
Here are some examples of the code comments to use in the
.less
files:Source map
![Css less for mac and cheese Css less for mac and cheese](/uploads/1/1/1/8/111815161/688299357.jpg)
This will produce a
.map
file next to the generated .css
file. Be aware that if you specify a file name for the source map like --source-map=file.map
, the file may not be included in the project. Just use the flag without the file name like this --source-map
.Output to other directory
Autoprefix
See Browserlist for description on how to construct the value.
CSSComb
Available values are
zen
, yandex
and csscomb
. Remember to specify --csscomb
after --autoprefix
if both are specified.Minification
By default a
.min.css
file is generated, but that can be turned off by a comment containing no-minify
in it. You can combine it with the compiler configuration like so:Combine it all
This example doesn't minify the output, enables both relative urls and source maps and redirects the output file to a different directory.
Compiler default options
You can specify the compiler options for the solution, the project or for individual folders by placing a file called
less.defaults
in any folder next to or above the .less files.Css Less For Macro
The default file cannot contain information about the output file, but all other options can be set.
Example:
Note that it isn't prefixed with
//
Even though minification isn't technically an option you set on the compiler, you can still opt out of minification like so:
Less Css Mac
Contribute
Check out the contribution guidelines if you want to contribute to this project.
Css Less For Machine Learning
For cloning and building this project yourself, make sure to install the Extensibility Tools 2015 extension for Visual Studio which enables some features used by this project.