CSS all bunched up - quick way to fix "layout"?

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
simonmlewis
DevNet Master
Posts: 4434
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

CSS all bunched up - quick way to fix "layout"?

Post by simonmlewis »

I have been given a CSS file, and need to go through it to strip out the classes not needed.
But it's all completely bunched up, with hardly any spaces and no 'returns'.

Is there a little tool that can go thru it in a second, and make it layout correctly?

So it isn't like this....

Code: Select all

 .logo-icon{float:left;width:50%}}.error-page-content .logo-icon img{display:block;max-width:100%;height:auto}.error-page-content p,.error-page-content span,.error-page-content a{font-weight:bold;font-size:16px;color:#ed1c24}.error-page-content a{text-decoration:underline}.noUi-target,.noUi-target *{-webkit-touch-callout:none;-webkit-user-select:none;-ms-touch-action:none;-ms-user-select:none;-moz-user-select:none}.noUi-base{display:none;visibility:hidden}.noUi-base:first-child.....
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
Celauran
Moderator
Posts: 6425
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: CSS all bunched up - quick way to fix "layout"?

Post by Celauran »

It's minified. Most IDEs will be able to handle that for you, and I believe there's a Sublime Text plugin. Barring those, there's this online tool http://mrcoles.com/blog/css-unminify/
simonmlewis
DevNet Master
Posts: 4434
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: CSS all bunched up - quick way to fix "layout"?

Post by simonmlewis »

OH my goodness that is better.

Thanks a mill.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
Post Reply