PHPackages                             mishal/iless - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. mishal/iless

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

mishal/iless
============

Less.js port to PHP

2.2.0(10y ago)4737.0k—0%10[5 issues](https://github.com/mishal/iless/issues)2MITPHPPHP &gt;=5.4.0

Since Apr 1Pushed 7y ago6 watchersCompare

[ Source](https://github.com/mishal/iless)[ Packagist](https://packagist.org/packages/mishal/iless)[ Docs](http://github.com/mishal/iless)[ RSS](/packages/mishal-iless/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)DependenciesVersions (18)Used By (2)

[![Build Status](https://camo.githubusercontent.com/414f0b609cf6b754564f408b69721bd7f873e0f27ced68af9e907721d2b6738f/68747470733a2f2f7472617669732d63692e6f72672f6d697368616c2f696c6573732e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/mishal/iless)[![Dependency Status](https://camo.githubusercontent.com/d83ad6ee97d97248475e10acb2ca4ccdc156e696245f44cba2465488fc6ee7f1/68747470733a2f2f67656d6e617369756d2e636f6d2f6d697368616c2f696c6573732e737667)](https://gemnasium.com/mishal/iless)[![Downloads](https://camo.githubusercontent.com/3f6efe601fc0894cdea6aa23c3684448caee576021461cb8fd868e62973ee4d3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6d697368616c2f696c6573732e737667)](https://packagist.org/packages/mishal/iless)[![Latest release](https://camo.githubusercontent.com/e81f8ac796c1d8cdf246aa3140e290a3319cf96e0b4dd9a294ad93c7f3fe7d5a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d697368616c2f696c6573732e737667)](https://github.com/mishal/iless/releases)

ILess - PHP port of Less.js
===========================

[](#iless---php-port-of-lessjs)

[![ILess](logo.png)](logo.png)

What is Less?
-------------

[](#what-is-less)

Less is a CSS pre-processor, meaning that it extends the CSS language, adding features that allow variables, mixins, functions and many other techniques that allow you to make CSS that is more maintainable, themable and extendable.

For more info about the language see the official website:

What is This?
-------------

[](#what-is-this)

ILess is a **PHP port** of the official LESS processor written in Javascript. Current version of ILess is compatible with less.js `2.5.x.`

Getting Started
---------------

[](#getting-started)

To use ILess in your project you can:

- Install it using Composer ([more info on Packagist](https://packagist.org/packages/mishal/iless))
- [Download the latest release](https://github.com/mishal/iless/releases)
- [Install the PHAR executable](https://github.com/mishal/iless#phar-installation)
- Clone the repository: `git clone git://github.com/mishal/iless.git`

Requirements
------------

[](#requirements)

To run ILess you need `PHP >= 5.4.0`

Feature Highlights
------------------

[](#feature-highlights)

- Allows to register **custom file importers** (from filesystem, database, ...)
- Allows to setup **import directories** so search imports for
- Allows to define **custom LESS functions** with PHP callbacks, supports context aware dynamic functions
- Allows to **use plugins** for pre/post processing of the CSS (currently only via API, not from command line)
- Generates **source maps** (useful for debugging the generated CSS)
- Generates debugging information with SASS compatible information and/or simple comments
- Allows caching of the precompiled files and the generated CSS
- Is **unit tested** using PHPUnit
- Compiled CSS is 100% equal to CSS compiled with less.js (exception is the javascript, which cannot be evaluated using php)
- Provides command line utility
- Has developer friendly exception messages with location of the error and file excerpt (output is colorized when used by command line)
- Has well documented API, see [the docs](http://doc-iless.rhcloud.com)
- Is PHP 7 and HHVM compatible

Usage
-----

[](#usage)

### Basic usage

[](#basic-usage)

```
