HighDots Forums  

Looking for CSS minimizer

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Looking for CSS minimizer in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
GTalbot
 
Posts: n/a

Default Re: Looking for CSS minimizer - 07-15-2008 , 12:39 AM






On Jul 3, 10:59*am, "Jonathan N. Little" <lws4... (AT) central (DOT) net> wrote:

Quote:
The biggest problem is not filesize but in most cases going overboard on
* css rules that bog down the processing of the page for the browser.
Some sites have thousands of rules, many contradictory, or unnecessary.
Exactly. Very long CSS stylesheets, over-excessively specified CSS
rules, over-qualified CSS rules, over-excessive detailed style
declarations (sometimes to work around browser bugs but more often
typical of a pixel-precise and constraining webpage layout) are more
and more frequent.

Often, bloated CSS code start with universal selector like

* {margin: 0; padding: 0;}

which I think should be exposed, explained and denounced. There are
maybe only 3 types of elements which default browser values need to be
neutralized or zero-ed: lists (ul, ol: margin-left and padding-left),
list-item (li: margin-left and padding-left) and form elements
(vertical margins). That's it.

Regards, Gérard


Reply With Quote
  #12  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Looking for CSS minimizer - 07-15-2008 , 08:25 AM






GTalbot wrote:

Quote:
Often, bloated CSS code start with universal selector like

* {margin: 0; padding: 0;}

which I think should be exposed, explained and denounced. There are
maybe only 3 types of elements which default browser values need to be
neutralized or zero-ed: lists (ul, ol: margin-left and padding-left),
list-item (li: margin-left and padding-left) and form elements
(vertical margins). That's it.

Actually depending on the design one may need to zero out the BODY in
order to hang your "decor" flush with the browser window...

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #13  
Old   
Bergamot
 
Posts: n/a

Default Re: Looking for CSS minimizer - 07-16-2008 , 10:15 AM




GTalbot wrote:
Quote:
Often, bloated CSS code start with universal selector like

* {margin: 0; padding: 0;}

which I think should be exposed, explained and denounced.
Hey - I denounce it!

This is something that's only used by control freaks.

--
Berg


Reply With Quote
  #14  
Old   
Chris F.A. Johnson
 
Posts: n/a

Default Re: Looking for CSS minimizer - 07-16-2008 , 02:19 PM



On 2008-07-15, GTalbot wrote:
Quote:
On Jul 3, 10:59*am, "Jonathan N. Little" <lws4... (AT) central (DOT) net> wrote:

The biggest problem is not filesize but in most cases going overboard on
* css rules that bog down the processing of the page for the browser.
Some sites have thousands of rules, many contradictory, or unnecessary.

Exactly. Very long CSS stylesheets, over-excessively specified CSS
rules, over-qualified CSS rules, over-excessive detailed style
declarations (sometimes to work around browser bugs but more often
typical of a pixel-precise and constraining webpage layout) are more
and more frequent.

Often, bloated CSS code start with universal selector like
Nonsense.

Quote:
* {margin: 0; padding: 0;}
That's very useful, but will probably make rendering the page a
little slower.

Quote:
which I think should be exposed, explained and denounced.
There's nothing wrong with it.

Quote:
There are maybe only 3 types of elements which default browser
values need to be neutralized or zero-ed: lists (ul, ol: margin-left
and padding-left), list-item (li: margin-left and padding-left) and
form elements (vertical margins). That's it.
Quite the opposite; those are the elements that usually need the
margin-left or padding-;left reinstated.

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.