0

I have been creating a mobile site based on oding from iWebKit 5, I have been using their css stylesheet and all is working fine, however the formatting of the css is all on one line, this obviously makes it confusing and almost impossible to read, so I wish to format it. I have tried many online formatters but they somehow either compress the code and screw it up or they rearrange it and it doesn't end up working. I have also had issues with certain formatters removing what they deem "bad attributes" which are actually iDevice specific styles.

So my question is, is there something/someone that could help me re arrange my code into a readable but obviously functioning css stylesheet?

Here is the link to the stylesheet:

http://pastebin.com/czuuaPyn

ThinkingStiff
65.4k31 gold badges148 silver badges241 bronze badges
asked Apr 14, 2012 at 14:23
7
  • 1
    Have you tried ProCSSor? Your link won't load, either. Please put your CSS on Pastebin, or another more reliable server. Commented Apr 14, 2012 at 14:27
  • 1
    Your link doesn't load for me, can you post it over at pastebin.com? Commented Apr 14, 2012 at 14:28
  • 1
    It does load, it's just really slow. Probably because none of us are anywhere near Australia :-) Commented Apr 14, 2012 at 14:30
  • This should probably be migrated to codereview.stackexchange.com Commented Apr 14, 2012 at 14:35
  • pastebin.com/czuuaPyn is the link to the CSS, I shall try ProCSSor and report back :) Commented Apr 14, 2012 at 14:35

3 Answers 3

2

I hardly ever have to do this the other way around but when the occasion does arise, I go for an online-tool such as http://cssbeautify.com/. It's pretty good for "untangling" css.

answered Apr 14, 2012 at 14:29
Sign up to request clarification or add additional context in comments.

1 Comment

CSS Beautify did it perfectly! Thanks so much!
1

Quick and dirty solution:

  • Open the file in any editor that has Search+Replace
  • Replace { with {\n\t
  • Replace ; with ;\n\t
  • Replace } with \n}\n
  • Tidy up any irregularities (particularly comments, possibly media queries)
answered Apr 14, 2012 at 14:32

Comments

0

This should do it:

http://pastebin.com/CmXhA87P

Ran it through a Codebeautifier without any filters or modifiers enabled.

answered Apr 14, 2012 at 14:36

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.