Re: Looking for CSS minimizer

Giganews Newsgroups
Subject: Re: Looking for CSS minimizer
Posted by:  Harlan Messinger (
Date: Thu, 03 Jul 2008

(follow-ups set to c.i.w.a.s only, since this isn't an HTML question)

Yashgt wrote:
> I have a large CSS file which has classes defined such as:
> myclass {
> margin-right:7px;
> margin-top:5px;
> padding-bottom:5px;
> padding-top:5px;
> }
> I would like to reduce the CSS file to its minimum with
> - redundant lines removed
> - defintion shortened. e,g. the above class should be changed to
> margin : 5px 7px 0px 0px;
> padding : 5px 0px 5px 0px;

margin: 5px 7px 0px 0px;

is not the equivalent of

margin-right: 7px;
margin-top: 5px;

The former may override left and bottom margins that would otherwise
have been set on the affected elements because of other CSS rules that
have been applied.

By the way, you need a period in front of myclass.



In response to

Looking for CSS minimizer posted by Yashgt on Thu, 3 Jul 2008