I have a compressed CSS file (all whitespace removed) that I want to inspect, but it's a huge pain inspecting it as-is. Is there any utility (preferably linux command line) that I can run the file through to format it nicely?
This tool allows loading the CSS URL to beautify. Click on the URL button, Enter URL and Submit. Users can also format CSS File by uploading the file. Beautify CSS Online works well on Windows, MAC, Linux, Chrome, Firefox, Edge, and Safari.
press F1 or ctrl+shift+p and then enter beautify ..
Information: Readable CSS You can add whitespace and comments to your stylesheets to make them more readable. You can also group selectors together, when the same style rules apply to elements selected in different ways.
The online service that Dave Newman mentioned has been converted into a Node.js script, which you can run on the command-line. If you have NPM installed you can just do:
npm install -g cssunminifier
And it’s pretty versatile how you can use it. Here are 3 different examples:
cssunminifier style.min.css style.css
cssunminifier --width=8 style.min.css
curl http://cdn.sstatic.net/stackoverflow/all.css | cssunminifier - | less
Here’s more info on the command-line css unminifier
Try this online service.
You can also inspect any compressed file in Firebug.
These programs are called 'beautifiers'. You should be able to google one that fits for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With