Classes to differentiate between different status messages? After enabling my custom theme, I noticed that while Drupal adds special classes for different status messages being put out by the drupal_set_message() function, e.g. messages and messages--status. However, when I use drupal_set_message() in my module, the messages get displayed but no classes are added to the container that is displaying these messages, thus it makes them hardly stylable.

I've been looking for a solution but no site I've been able to find mentiones this. Is this a bug or am I doing something incorrectly?

Thanks a lot in advance.
I've been looking around in core a bit and found a solution from the classy theme. Copying its status-messages.html.twig file to my theme solves the problem since the type classes for each message are being set there.

{{ attach_library('classy/messages') }}
{% block messages %}
{% for type, messages in message_list %}
    {%
    set classes = [
    'messages',
    'messages--' ~ type,
    ]
    %}


I think this logic in views is a bit weird.