Ever found a really good theme that was just short of greatness? All you had to do was fiddle with a bit of css here or there and it was just perfect.

The only problem was that when a newer version of the theme was released, all those changes would be lost. You would have to carry them out again, remember what you had changed and how. If you were technically savvy, you maybe even created a patch which may or may not apply any longer. Even without updates, maybe you wanted to cancel one of your customisations, but it was not always easy to remember what was changed where.

Such small customisations were the bane of any theme user, however help is at hand with local.css, which is being used for more and more themes to keep local customisations separate from the rest of the theme.

With Arthemia for Drupal (and some other drupal themes too), all you need to do is place your customisations into a separate local.css file and drop it into the theme folder. Come update time, that file should remain untouched, leaving your theming customisations in one place.

Comments

Doesn't this double up on the CSS though? The user needs to then load both the style and local CSS file.

Member since:
3 June 2009
Last activity:
1 year 10 months

The browser will do that for the user. Besides, many modules also supply their own additional style sheets, so if you only want one by default, the way to do that is not by not specifying additional style sheets, but by turning on css aggregation.

If you turn on css aggregation in the performance settings, all the separate css files from the many modules will all be merged into one.

I'm not necessarily saying I want one file. All I'm saying is that if you use the local.css and don't change the style.css, the visitor will have more to download.

eg: Lets say you wanted to change the default color of the site which amounted to 30 CSS color codes you need to change.

You'd need to make duplicate entries in the local file for each of these, thus giving you 60 color code lines now.

Is that not correct?

Member since:
3 June 2009
Last activity:
1 year 10 months

Yes it is and that is the price you pay for convenience. You could simply modify the style.css file, however when it comes to upgrades, you will have to re merge your changes to later releases of the theme, remembering where the changes were made.

By all means you can do that and it is possible to keep a diff/patch of the changes to hand, but for many people that is too much of a hassle and loading an additional style sheet does not cover a big enough overhead for most people to worry about.