Pragmatism in code

Waxing lyrical about life the universe and everything software related since lunchtime 2006.

JomSocial CSS Maxification - less is actually more

JomSocial CSS Maxification - less is actually more

Just been putting a site together on the new JomSocial version 3. One of the first things I always do (as you should) is create a new template - a clone of the original one. This way I can hack away at creating the site and develop the template as I go along without changing the default.

Changing the style of elements by CSS is a pretty normal act and one that I prefer to do with the original CSS and not by overrides as is always suggested by vendors. Normally I use Coda to de-minify any minified CSS and then re-minify it once I have finished. For some reason I was hitting a few issues when de-minifying the standard templates style.css file, it seemed to be replacing any reference to images with an ASCII reference instead of the path and filename data. Guessing that this must be due to the method used to compress the file (something other than the normal whitespace stripper) I went on a hunt to find out what was up with the new CSS file format.

Not finding too much I stumbled across This Post which simply suggests that the CSS files should not be modified but does not say how they were compressed and how to de-minify them. It does however give a clue - 'use less compiler'.

So I goggled 'useless compiler' and came across the website. I say 'useless' with my tongue in my cheek, for on the first page there is a bit of a breakdown showing some examples, one is the use of variables.

Continue reading
11641 Hits