Add CSS class to a flagged node
Try this in your template.php of your theme. Change MYTHEME to the name of your theme and bookmark to the machine name of your flag. And change node-flag-bookmark to the css class you want to be added to your node.

/**
 * Implements template_preprocess_node().
 */
function MYTHEME_preprocess_node(&amp;$variables) {
  $flag = flag_get_flag('bookmark'); // Machine name of your flag.
  if ($flag &amp;&amp; $flag-&gt;is_flagged($variables['node']-&gt;nid)) {
    $variables['classes_array'][] = 'node-flag-bookmark';
  }
}