To encourage customization, consider including support for a local.css file that won't get overwritten in upgrades. Take a look at acquia_marina for an example if you're unfamiliar. Ship the theme with an empty file called local.sample.css, and in the theme itself, test for the existence of local.css. If it exists, include it.

Comments

atrasatti’s picture

Will do, thanks for the tip.

The theme is a bit complicated on the CSS side, it has a reset.css and then another css file and they are both specific for the type of device that is recognised (high or low end). But I would definitely want to help customisation, so I will look into it.

benjifisher’s picture

Version: 6.x-1.1 » 6.x-1.3

As a work-around, I edited page.tpl.php as follows:

                <?php print $styles; ?>
                <?php print $scripts; ?>
<?php // BF:  I insist on loading my style sheet last!
print '<link type="text/css" rel="stylesheet" media="all" href="/' . $directory . '/local.css" />';
?>
        </head>

The code in template.php seems to add style sheets dynamically via the $scripts variable, so I put my link tag after that. If I did not want to include the comment, I would have done it like this:

<link type="text/css" rel="stylesheet" media="all" href="/<?php print $directory; ?>/local.css" />
atrasatti’s picture

Assigned: Unassigned » atrasatti
Status: Active » Needs review

Should be implemented in http://drupal.org/cvs?commit=475952

A generic local.css can be used in /css or device-class-specific in /css/device_class/local.css. local.css is added as last.

benjifisher’s picture

It works fine for me. I am using the version of the theme that I got from CVS, so it does not include my hack (see comment #2). I moved my local.css to the css/ directory, and cleared the theme cache.

I did not look at the code change.