Monday, July 6, 2015

CSS Structurizor

Update Oct 10, 2015

Please use Firefox if you have thousands of lines.


  • Added @charset "UTF-8"; or @charset 'UTF-8'; filter.
  • Updated the auto keyword structuring.
  • Updated the CSS RegExp filter input strings.


  • Updated the background-* filter.
  • Updated the base64 structuring filter.

How to use this:

  • Make sure your input is CSS. Paste your code on the textarea. You'll see the (approximated) size of your codes.
  • Hit either "2 Spaces" or "4 Spaces" to indent your CSS. You'll get the structured CSS code and the size.
  • Hit "RESTORE" to revert back to its original state.
  • To keep important comment in your CSS, use /*! as opening (with exclamation).

How this works:

  • It first (half) compacts the CSS using the method from the earlier tool (you can see the link below).
  • Then, the magic begins.
  • This only works for two nested-blocks deep. Deeper than that, it won't be CSS. I guess. Hm.

Indentation style

This applies the Stroustrup (Bjarne Stroustrup) variant of K&R (Kernighan and Ritchie's The C Programming Language) indentation style.

Sort of...

CSS Trimmer