![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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; |
#3
| |||
| |||
|
|
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; |
#4
| |||
| |||
|
|
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; |
#5
| |||
| |||
|
|
On 3 Jul, 11:14, Yashgt <yas... (AT) gmail (DOT) com> 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; This is a difficult problem, so difficult that it's impractical. It's certainly not possible to do it (usefully) by processing the CSS alone. |
#6
| |||
| |||
|
|
Andy Dingley <dingbat (AT) codesmiths (DOT) com> writes: On 3 Jul, 11:14, Yashgt <yas... (AT) gmail (DOT) com> 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; This is a difficult problem, so difficult that it's impractical. It's certainly not possible to do it (usefully) by processing the CSS alone. Good reply. In any case, the quickest and most efficient way to shrink your CSS is to gzip it. Just as a test, I gzipped the CSS from the xkcd.com homepage, which brought the filesize down to 893 bytes, from 9048 bytes; a reduction of over 90%. Any further reductions by 'preprocessing' the code will probably be minimal. |
#7
| |||
| |||
|
|
Some sites have thousands of rules, many contradictory, or unnecessary. |
#8
| |||
| |||
|
|
Good reply. In any case, the quickest and most efficient way to shrink your CSS is to gzip it. Just as a test, I gzipped the CSS from the xkcd.com homepage, which brought the filesize down to 893 bytes, from 9048 bytes; a reduction of over 90%. Any further reductions by 'preprocessing' the code will probably be minimal. |
#9
| |||
| |||
|
|
Good reply. In any case, the quickest and most efficient way to shrink your CSS is to gzip it. Just as a test, I gzipped the CSS from the xkcd.com homepage, which brought the filesize down to 893 bytes, from 9048 bytes; a reduction of over 90%. Any further reductions by 'preprocessing' the code will probably be minimal. How do you import such a zipped file? |
#10
| |||
| |||
|
|
Good reply. In any case, the quickest and most efficient way to shrink your CSS is to gzip it. Just as a test, I gzipped the CSS from the xkcd.com homepage, which brought the filesize down to 893 bytes, from 9048 bytes; a reduction of over 90%. Any further reductions by 'preprocessing' the code will probably be minimal. How do you import such a zipped file? |
![]() |
| Thread Tools | |
| Display Modes | |
| |