Skip to content

smalyshev/clessc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

* Introduction

This is a LESS CSS compiler written in C++.

A LESS CSS compiler compiles stylesheets in the LESS format to
CSS. Read more on http://lesscss.org/ 

* Differences from the original compiler

This compiler does not apply formatting to the code. The CSS in the
output contains no whitespace except where necessary. If you need it
to be user-readable you can use a CSS formatter. Try CSSTidy:
http://csstidy.sourceforge.net/

CSS comments are not included in the output. The purpose of this
compiler is to produce the smallest amount of output as possible. 

Parentheses are not required in compound values:

border: @width * 2 solid black;

The spin() function produces slightly different results.

* Installation

If compiling from the source checked out with git you first have to
run ./autogen.sh to generate the 'configure' script. This requires
autotools. The tarball distribution will already have the 'configure'
script.

To build the compiler just run

./configure
make

This requires a c++ compiler and the libpng and libjpeg libraries. To
build without the libraries run configure with these arguments:

./configure --without-libpng --without-libjpeg
make

After compiling you will have the binary lessc. You can run 'make
install' as root to install the binary.

Note that the original compiler is also named lessc. 

* Usage

To compile the LESS stylesheet stylesheet.less and write the resulting
CSS to stylsheet.css run:

lessc stylesheet.less > stylesheet.css

or:

lessc stylesheet.less -o stylesheet.css

About

A C++ implementation of the LESS CSS Compiler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 87.0%
  • CSS 8.5%
  • C 3.0%
  • PHP 1.5%