Drupal 8/9: Adding CSS body classes based on the current user's roles
Sometimes it's useful to add body classes based on the current Drupal user's roles.
This article shows how to do this by adding or modifying a
template_preprocess_html() implementation in your
No twig modifications or plugins required.
Continue reading the full article over at https://trainingcloud.io/blog/2021/05/drupal-8-9-adding-css-body-classes-based-on-user-roles/