How to add css to a form according to the user's role?
You need to call $user object and compare user role with current logged in user.

function theme_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  global $user, $theme;

  switch ($form_id) {
    case 'formtype_form':
      // change user_role to whatever role you want to restrict this css
      if (in_array('user_role', array_values($user-&gt;roles))) {
        $form['#attached']['css'] = array(
          drupal_get_path('theme', 'projectname') . '/css/new.css',
        );
      }
      break;
  }
}