adding class to drupal8 taxonomy
You can use preprocess field hook which is supported in drupal 8 also . Example below:

function example_preprocess_field(&amp;$variables) {
    if (($variables['element']['#field_name'] == 'example')) {
    //get the value of the field
    dsm($variables);
    // add a class to the field        
    $variables['attributes']['class'] = [
     'example'
      ];
  }
}