I'm using phptemplate_preprocess_page()
to add a set of style-sheets which are only needed for a certain content type.
function phptemplate_preprocess_page(&$variables) {
if ($variables['node']->type == 'example') {
drupal_add_css(path_to_theme() . '/css/example.css');
$variables['styles'] = drupal_get_css();
}
}
The problem is that my added style-sheet is added to the top of the list, which results in undesired behavior. For example, let's say that in my main theme style-sheet I define the font-size
of p
to be 11px
, but in my example.css
for this specific content type I need it to be 15px
. The main style-sheet is added via the .info
file of the theme.
It seems I can only think of icky ways to add my specific style-sheet at the bottom of the list, or at least below the theme default ones.
Is there any proper way to order them?