CSS Minify API 1.2 released!

We have just released a new version of the API to minimize CSS. Based on your feedback we have added four new parameters:

removeurlquotes: Removes quotes from urls. Default is true.
removecomments: Removes all comments. Default is true.
sortproperties: Sort CSS properties alphabetically. Default is false.
wrapcsslines: Wrap lines at 80 characters. Default is false.

Below is an example in PHP that implements these new parameters:

<?php

$css = "
/*I am a comment*/
.maui {
    color:red;
    background: url('/images/dotmauiiscool.jpg');
}
";

$data = array("apikey"          => "YOUR_API_KEY", 
              "css"             => $css,              
              "removecomments"  => "false",
              "removeurlquotes" => "false",
              "sortproperties"  => "true",
              "wrapcsslines"    => "true");

$curl = curl_init("https://api.dotmaui.com/client/1.2/cssmin/");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 

$output = curl_exec($curl);  

curl_close($curl);

echo $output;
// /*I am a comment*/ .maui{background:url('/images/dotmauiiscool.jpg');color:red}

Leave a Comment

Your email address will not be published. Required fields are marked *