Unminify Minified CSS

Say what?

Well, I was work­ing with Google’s pret­typrint library which is really nice for out­putting code in a nice and ‘print friendly’ way. It even allows you to skin the way it looks and I used a really nice sun­burst theme.

One of the things I wanted that it didn’t offer by default was code line num­ber on every line. By default it shows you every 5th line. You can start the line num­ber­ing to begin at any num­ber but not every line shows.

I looked online and found how to do this. The instruc­tions were sim­ple. Just com­ment out this line of code:

li.L8 { list-style-type: none }

So I jumped into prettyprint.css and saw that it was mini­fied and didn’t see an unmini­fied ver­sion of the css file. I down­loaded the src code and it didn’t have it either. It then occurred to me… if I can use tools to minify CSS, can I use a tool to un-minify CSS? The answer is yes. Here it is.

I un-minified my CSS and com­mented out the code like I was told. Noth­ing hap­pened. Why? Because I wasn’t using prettify.css. I was using sunburst.min.css. So I un-minified that, made the appro­pri­ate changes by com­ment­ing out the line and it worked. I now have lines on all my pret­typrinted pages. A small vic­tory for mankind. A small vic­tory for me.

Leave a Reply

Your email address will not be published. Required fields are marked *