I want to modify dynamically the style of a page in base of your content type: I tried with a preprocess function insert this code:
if(isset($variables['node'])){
if($variables['node']->type=='article'){
drupal_add_css(drupal_get_path('theme','my_theme').'/css/style_node_article.css');
}
if($variables['node']->type=='page'){
drupal_add_css(drupal_get_path('theme','my_theme').'/css/style_node_page.css');
}
}
This doesn't set the right CSS if I change page from article to page... Thanks