Adding a class to “body” I'm trying to add a custom CSS class to the &lt;body&gt; tag, How can I modify or pre-process the &lt;body&gt; tag to add the class body, Is it right to style the &lt;body&gt; tag with css file?
Alternatively, you could implement template_preprocess_html in your [themename].theme file.

function themename_preprocess_html(&amp;$variables) {
  $variables['attributes']['class'][] = 'class-name';
}


See the documentation: https://api.drupal.org/api/drupal/core%21includes%21theme.inc/function/template_preprocess_html/8.2.x