scylabs/css2less

css to less converter

1.0.0 2019-10-29 09:54 UTC

This package is not auto-updated.

Last update: 2024-04-24 07:18:15 UTC


README

Build Status Code Rating Coverage Status

css2less

This library has created by Remo Laubacher : remo.laubacher@ortic.com https://github.com/ortic/css2less This repository is just a re-upload of the package to put it on composer

this library aims to convert CSS files into LESS files.

Currently used by http://www.css2less.net/

example

The code below takes a few CSS instructions and prints them in a more LESS like form:

$cssContent = 'body p { font-family: arial; }';
$css2lessParser = new \Ortic\Css2Less\Css2Less($cssContent);
echo $css2lessParser->getLess();

output:

body {
        p {
                font-family: arial;
        }
}