csscomb::csscomb PHP Method

csscomb() public method

public csscomb ( $css = '', $debug = false, $custom_sort_order = null ) : string | false
return string | false
    function csscomb($css = '', $debug = false, $custom_sort_order = null)
    {
        $this->output = $debug ? true : false;
        if ($css && is_string($css)) {
            $this->code['original'] = $this->code['edited'] = $css;
            $this->set_mode();
            $this->set_sort_order($custom_sort_order);
            $this->preprocess();
            $this->parse_rules();
            $this->postprocess();
            return $this->end_of_process();
        } else {
            return false;
        }
    }

Usage Example

Example #1
0
#!/usr/bin/php
<?php 
/**
 * CSScomb
 * @version: 2.11 (build 4d71dea-1210271349)
 * @author: Vyacheslav Oliyanchuk (miripiruni)
 * @web: http://csscomb.com/
 */
require_once getenv('TM_BUNDLE_SUPPORT') . '/csscomb.php';
$input = file_get_contents('php://stdin');
$c = new csscomb();
echo $c->csscomb($input);
All Usage Examples Of csscomb::csscomb