[_] CSS file(s) layour best practices
Tim Beadle
tim.beadle at gmail.com
Thu Oct 12 13:19:20 BST 2006
On 12/10/06, joel at jojet.com <joel at jojet.com> wrote:
> Hi [_],
> Anyone got any best practices for laying out CSS files (multiple
> files/indentations/grouping etc etc)
Keep the number of files to a minimum - each http request has an
overhead over and above the actual filesize, so it makes sense to
have, for instance:
* a basic style sheet (linked. optional, if you want NS4 etc to get
some basic styling)
* an advanced sheet (imported, to exclude NS4)
* a print sheet (for printing, natch)
* (if necessary) an IE fixes sheet, linked within a conditional
comment so that only IE gets it.
See also: Doug Bowman's flags tip:
http://www.stopdesign.com/log/2005/05/03/css-tip-flags.html
Tim
> Hi [_],
> Anyone got any best practices for laying out CSS files (multiple
> files/indentations/grouping etc etc)
Keep the number of files to a minimum - each http request has an
overhead over and above the actual filesize, so it makes sense to
have, for instance:
* a basic style sheet (linked. optional, if you want NS4 etc to get
some basic styling)
* an advanced sheet (imported, to exclude NS4)
* a print sheet (for printing, natch)
* (if necessary) an IE fixes sheet, linked within a conditional
comment so that only IE gets it.
See also: Doug Bowman's flags tip:
http://www.stopdesign.com/log/2005/05/03/css-tip-flags.html
Tim