![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
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. |
#12
| |||
| |||
|
|
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. |
#13
| |||
| |||
|
|
Often, bloated CSS code start with universal selector like * {margin: 0; padding: 0;} which I think should be exposed, explained and denounced. |
#14
| ||||
| ||||
|
|
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 |
|
* {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. |
![]() |
| Thread Tools | |
| Display Modes | |
| |