Change style of custom view mode condionally
This is pretty similar to How to provide template for particular view mode? where as you can add custom php code to add further variables used in that viewmode or add simple if/ else/ in_array to the used template (this is not limited to a custom template - you can always override the default node.tpl.php in your theme.

UPDATE: add only a css class depending on the term reference field.

// can also be THEME_
function MYMODULE_preprocess_node(&amp;$vars) {
  if ($vars['view_mode'] == 'myviewmode') {
    if(isset($vars['node']) &amp;&amp; isset($vars['node']-&gt;field_my_term_reference)) {
      // class to add a general has-term-reference-class
      $vars['classes'][] = 'has-term-reference';
      // add a specific term-reference-class
      foreach($vars['node']-&gt;field_my_term_reference as $tid) {
        // class based on term id
        $vars['classes'][] = 'term-id-' . $tid;
        // class based on term name
        $term = taxonomy_term_load($tid);
        $vars['classes'][] = 'term-name-' . $term-&gt;name;
      }
    }
  }
}