how many css files?

Permalink
I have seen two different tutorials on how to setup your site for concrete5 functionality.

One recommends 2 css files:
main.css
typography.css

But the 'official' tutorial on this site (by Andrew) made no mention and I noticed there was just one default.css

Being the author, I presume Andrew's advice is more accurate?

trixiemay
 
ijessup replied on at Permalink Reply
ijessup
Its a personal preference thing.

There is no "right" way. For some people, separating the css into separate files makes it easier to for them to edit it later.

You could use 50 css files if you wanted.

Regardless, you have to reference every css file you use.

Personally, I separate the files. The more files that get loaded, the more Hits that get registered with logging programs like Awstats. And marketing companies, for some reason, bank on your site's hits.

The down side to loading more than one file is an insignificantly slightly slower load time.
trixiemay replied on at Permalink Reply
trixiemay
Thanks for the advice.

Incidentally, from the look of your avatar, can you see your screen over your keyboard? lol
ijessup replied on at Permalink Reply
ijessup
:p
Smittie replied on at Permalink Reply
Smittie
For multiple style sheets, how can they be contained in a directory. I want to put all the css files in a 'css' directory but I haven't figured out how to get c5 to load them from that directory.

Thanks,
Smittie
nando replied on at Permalink Reply
nando
I place all the css in a folder in the themes folder
root/themes/myTheme/css/
then link them from the header
root/themes/elements/header.php

<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('css/main.css')?>" />
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('css/typography.css')?>" />
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('css/justanother.css')?>" />
snorcha replied on at Permalink Reply
you should note that for each stylesheet you link to, it fires off a http request.

Not such an issue on smaller sites, but high traffic sites it can impact the server performance somewhat.

Cheers,
Snorcha
Smittie replied on at Permalink Reply
Smittie
In this day and age, are we really still worried about http gets as a hit on server performance?
snorcha replied on at Permalink Reply
really only an issue on shared hosts that limit the amount of concurrent connections i guess.