Views listings are made from many users, but some of them have special role that is more important. Is there an easy way to give that special role different background color or font or font size when viewing views results ?
2 Answers
In your theme template.php file add this function
function THEMENAME_preprocess_html(&$vars) {
foreach($vars['user']->roles as $role {
$vars['classes_array'][] = 'role-' . drupal_html_class($role);
}
}
This will add the current role(s) to the body classes.
Now you can style it like this
body.role-admin .view-VIEW-CLASS {
background: #eeeeee;
font-size: 16px;
}
You could use a module like this https://www.drupal.org/project/views_table_highlighter .
It would take some php coding, inside views.