Get rid of classes from views root container Looking for a way to clear all unnecessary in terms of semantic classes from top-level div for a view:

&lt;div class="view view-comments-count view-id-comments_count view-display-id-entity_view_2 view-dom-id-f2370f55bf76844fef6e17764e8a5058"&gt;
      &lt;div class="view-content"&gt;
        ROWS
    &lt;/div&gt;
&lt;/div&gt;


want to become:

&lt;div class="view"&gt;
      &lt;div class="view-content"&gt;
        ROWS
    &lt;/div&gt;
&lt;/div&gt;


I have tried Semantic Views and Fences but they all deal only with view content (field or rows) but not with the top-level div config.

I know that some bits can be changed with views-view.tpl.php however you can only clear all classes from it but I want to use css class from Views configuration.
You can use template_preprocess_views_view function and remove needles classes from  $vars['classes_array'] array.

function mymodule_preprocess_views_view(&amp;$vars) {
  if ($vars['view']-&gt;name == 'my_view') {
    $vars['classes_array'] = array('view', $vars['css_class']);
  }
}