How can i add a depth class to UL in a menu list?
For Drupal 7.

MYTHEME_menu_link(array $variables) {
  global $_current_menu_depth;
  $element = $variables['element'];
  $_current_menu_depth = $element['#original_link']['depth'];
  $sub_menu = '';

  if ($element['#below']) {
    $sub_menu = drupal_render($element['#below']);
  }
  $output = l($element['#title'], $element['#href'], $element['#localized_options']);
  return '&lt;li' . drupal_attributes($element['#attributes']) . '&gt;' . $output . $sub_menu . "&lt;/li&gt;\n";
}

function MYTHEME_menu_tree($variables) {
  global $_current_menu_depth;
  return '&lt;ul class="menu menu--'.$_current_menu_depth.'"&gt;' . $variables['tree'] . '&lt;/ul&gt;';
}


NOTE! I noticed this breaks in some cases. I had a three levels deep menu and the second level menu was marked as third.