<?php
require_once('class.css_to_less.php');
$css2less = new css_to_less(file_get_contents('css.css'));
$css2less->set_color_count(2); // If some color appears in css-code 2 or more times it will be replaced by variable
$css2less->set_max_selectors_count_in_block(4); // Maximum count of selectors in the css-block to separate it (block) by comas - A,B,C,D,E{...} to A{...} B{...} C{...} D{...} E{...}
$css2less->proc_less(); // Generate less-code
echo '<pre>';
echo $css2less->get_less(); // Output less-code
echo '</pre>';
?>
|