diff --git a/core/modules/system/src/Tests/Theme/MessageTest.php b/core/modules/system/src/Tests/Theme/MessageTest.php
index 451ec9ab55b5a6ae6163dfec2e8b4a287668dd43..3e8da82744ae8fd9e4e0549b9be0f19f6a83d0a8 100644
--- a/core/modules/system/src/Tests/Theme/MessageTest.php
+++ b/core/modules/system/src/Tests/Theme/MessageTest.php
@@ -25,6 +25,10 @@ class MessageTest extends KernelTestBase {
    * Tests setting messages output.
    */
   function testMessages() {
+    // Enable the Classy theme.
+    \Drupal::service('theme_handler')->install(['classy']);
+    $this->config('system.theme')->set('default', 'classy')->save();
+
     drupal_set_message('An error occurred', 'error');
     drupal_set_message('But then something nice happened');
     $messages = array(
diff --git a/core/modules/system/templates/status-messages.html.twig b/core/modules/system/templates/status-messages.html.twig
index a2f36311ff8463fd0624eb008ee5625e8860c330..59947e58de1d43cff645c34828075cf45512e6b4 100644
--- a/core/modules/system/templates/status-messages.html.twig
+++ b/core/modules/system/templates/status-messages.html.twig
@@ -26,13 +26,7 @@
  */
 #}
 {% for type, messages in message_list %}
-  {%
-    set classes = [
-      'messages',
-      'messages--' ~ type,
-    ]
-  %}
-  <div class="{{ attributes.addClass(classes).class }}" role="contentinfo" aria-label="{{ status_headings[type] }}">
+  <div class="{{ attributes.class }}" role="contentinfo" aria-label="{{ status_headings[type] }}">
     {% if type == 'error' %}
       <div role="alert">
     {% endif %}
@@ -40,9 +34,9 @@
         <h2 class="visually-hidden">{{ status_headings[type] }}</h2>
       {% endif %}
       {% if messages|length > 1 %}
-        <ul class="messages__list">
+        <ul>
           {% for message in messages %}
-            <li class="messages__item">{{ message }}</li>
+            <li>{{ message }}</li>
           {% endfor %}
         </ul>
       {% else %}
@@ -52,6 +46,4 @@
       </div>
     {% endif %}
   </div>
-  {# Remove type specific classes. #}
-  {{ attributes.removeClass(classes) }}
 {% endfor %}