I want to add the view mode of my content type as a class to body and I use Display Suite so
$node['view_mode'] is not available.
MYTHEME_preprocess_html(&$variables), I injected the service
\Drupal::service('entity_display.repository')->getViewModes('node') returns the list of all view modes for this content type.
How can I find out what the view mode of the active node is, in order to transform it into a class?
Thanks in advance for any help you can provide.