There are many online tools out there that can prettify or beautify compressed
CSS file. But some of them have bugs, for example, not recognizing the @media
directive. The easiest way to prettify an online compressed CSS file is to do
it in Google Chrome. Open Developer Tools and click Sources tab, select the
CSS file and then press the "Pretty Print" button {}
.
But there are problems too. Google Chrome does not add the semicolon after the last property or each rule. When you use these styles in LESS, you may get errors if you don't put a semicolon at the end. For example:
.example {
background: #666\9
}
You'll get a ParseError: Unrecognised input error.
Use "Find and Replace" in your text editor, for example, Sublime Text 3, to add the semicolons. Find with this regular expression:
([^;}])
(\s*)\}
and replace with:
$1;
$2}