Skip to content

Instantly share code, notes, and snippets.

@fitnr
Last active December 16, 2015 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fitnr/5373488 to your computer and use it in GitHub Desktop.
Save fitnr/5373488 to your computer and use it in GitHub Desktop.
Minimal use of [CSSTidy PHP](https://github.com/Cerdic/CSSTidy) library.
#!/usr/bin/php
<?php
include 'csstidyphp/class.csstidy.php' ;
$css = new csstidy();
// place the CSS that breaks here
$input = "body .foo {
*width: 10px;
width: 50px;
* height: 100px;
}";
$css->parse($input);
fwrite(STDOUT, $css->print->plain());
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment