Beauregard T. Shagnasty wrote:
Quote:
Originally Posted by
>
I find that a separate print style sheet greatly reduces maintenance.
|
Not necessarily. Depends on how the CSS is organized, I think.
Quote:
Originally Posted by
For one, you don't have to pore through hundreds of lines of screen
styles looking for each print style.
|
The problem with that is some styles I often want for both screen and
print. That means either duplicating them in the print stylesheet, or
loading 2 stylesheets. Too much trouble for me to keep that stuff
straight. Besides, I never intermix screen only and print rules.
I prefer to use 1 stylesheet and section it off by media type. I've been
doing it this way for so long I know exactly where to look for certain
rules.
@media screen, projection, print {
global rules like heading fonts, floating images, etc.
}
@media screen, projection {
screen only rules like navigation, background images, etc.
}
@media print {
print only rules, like display:none for navigation, etc.
}
I suppose you could stick handheld in there, too, but I don't bother. If
they get info sans CSS, that's fine with me.
Quote:
Originally Posted by
Download time would be next to nothing.
|
It is. IIRC, at least some browsers retrieve all stylesheets whether
they need them or not, then apply the applicable rules depending on what
the user requests. It's fewer server calls putting them into 1 external
stylesheet.
If your CSS is huge, however, then you should rethink a few things. KISS
comes to mind. :)
--
Berg