How to override specific row classes in a view preprocess function
For Example:



function THEMENAME_preprocess_views_view_unformatted(&amp;$variables) {
  $view = $variables['view'];
  $view_name = $view-&gt;id();

  if ($view_name = 'frontpage') {
    $rows = $variables['rows'];
    foreach ($rows as $id =&gt; $row) {
      if( in_array($id,[0]) ) { //first row only
        $attributes = $variables['rows'][$id]['attributes'];
        $attributes-&gt;removeClass('lol')-&gt;addClass('haha'); // changes "lol" to "haha"
        break;
      }
    }
  }

}