CSS Beautify API

Beautify CSS from an input string or url.

.Maui CSS Beautify API to beautify CSS documents from an input string or url.

POSTGET *
https://api.dotmaui.com/client/1.0/cssbeautify/

Parameters

Field Type Description Required
apikey String

.Maui Api key

True

css String

Valid CSS code

1

url String

Valid URL to a CSS file

1

1 There must be one of these values

 

Success 200 - Default Mode

It will be a string with CSS indented code

HTTP/1.1 200 OK         
.maui {
    color: red
}

Examples

import urllib.parse
import urllib.request

css_string = ".maui{color:red}.is{border:1px solid red}.awesome{font-weight:bold}"

params = urllib.parse.urlencode({'apikey': 'YOUR_API_KEY', 'css': css_string}).encode("utf-8")
beautiful = urllib.request.urlopen("https://api.dotmaui.com/client/1.0/cssbeautify/", data = params).read().decode("utf-8")

print(beautiful)

#.maui {
#    color: red
#}
#
#.is {
#    border: 1px solid red
#}
#
#.awesome {
#    font-weight: bold
#}


<?php

$data = array('apikey' => 'YOUR_API_KEY', 
              'url' => "https://dotmaui.com/assets/css/production/dotmaui.com_app_min.css?v=2");

$curl = curl_init("https://api.dotmaui.com/client/1.0/cssbeautify/");
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;

* Only for premium users.