mitmproxy/mitmproxy — pull request #198 by Kami (2014-01-04 03:56:03+00:00)
Title: Add CSS view which beautified minified CSS files

This branch adds CSS view which beautifies / re-formats minified CSS files.

This view beautifies minified CSS using `cssutils` library. If this library is not available, it acts as a no-op.

I don't know what's the dependency policy for this project so I have made `cssutils` dependency optional. If this library is not available, CSS simply won't be beautified.

I've done some manual testing and the library works pretty well. Only downside is that it gets kinda slow on very large minified files.

Example 1 (non-beautified CSS file):

![kami localhost -w-mitmproxy_004](https://f.cloud.github.com/assets/125088/1844011/c13cce18-74f3-11e3-8239-09ba0dfa371e.png)

Example 2 (beautified CSS file):

![kami localhost -w-mitmproxy_005](https://f.cloud.github.com/assets/125088/1844012/d33723b6-74f3-11e3-8c2f-33d069d414fa.png)