diff --git a/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipePlaceholderTestCases.php b/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipePlaceholderTestCases.php index 524680a235..f79ef2a027 100644 --- a/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipePlaceholderTestCases.php +++ b/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipePlaceholderTestCases.php @@ -88,11 +88,11 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf 'command' => 'insert', 'method' => 'replaceWith', 'selector' => '[data-big-pipe-placeholder-id="callback=Drupal%5CCore%5CRender%5CElement%5CStatusMessages%3A%3ArenderMessages&args%5B0%5D&token=_HAdUpwWmet0TOTe2PSiJuMntExoshbm1kh2wQzzzAA"]', - 'data' => '
' . "\n" . ' ' . "\n" . '
' . "\n", + 'data' => '
' . "\n" . ' ' . "\n" . '
' . "\n\n", 'settings' => NULL, ], ]; - $status_messages->embeddedHtmlResponse = '
' . "\n" . ' ' . "\n" . '
' . "\n\n"; + $status_messages->embeddedHtmlResponse = '
' . "\n" . ' ' . "\n" . '
' . "\n"; } // 2. Real-world example of HTML attribute value placeholder: form action. diff --git a/core/themes/bartik/templates/status-messages.html.twig b/core/themes/bartik/templates/status-messages.html.twig index aa1bedd773..a4e1e9e240 100644 --- a/core/themes/bartik/templates/status-messages.html.twig +++ b/core/themes/bartik/templates/status-messages.html.twig @@ -23,7 +23,7 @@ {% block messages %} {% if message_list is not empty %} {{ attach_library('bartik/messages') }} -
+
{{ parent() }}
{% endif %} diff --git a/core/themes/classy/templates/misc/status-messages.html.twig b/core/themes/classy/templates/misc/status-messages.html.twig index 0d059f33bb..308f88b0da 100644 --- a/core/themes/classy/templates/misc/status-messages.html.twig +++ b/core/themes/classy/templates/misc/status-messages.html.twig @@ -21,37 +21,38 @@ * - class: HTML classes. */ #} -
{% block messages %} -{% for type, messages in message_list %} - {% - set classes = [ - 'messages', - 'messages--' ~ type, - ] - %} -
- {% if type == 'error' %} -
- {% endif %} - {% if status_headings[type] %} -

{{ status_headings[type] }}

- {% endif %} - {% if messages|length > 1 %} -
    - {% for message in messages %} -
  • {{ message }}
  • - {% endfor %} -
- {% else %} - {{ messages|first }} - {% endif %} - {% if type == 'error' %} +
+ {% for type, messages in message_list %} + {% + set classes = [ + 'messages', + 'messages--' ~ type, + ] + %} +
+ {% if type == 'error' %} +
+ {% endif %} + {% if status_headings[type] %} +

{{ status_headings[type] }}

+ {% endif %} + {% if messages|length > 1 %} +
    + {% for message in messages %} +
  • {{ message }}
  • + {% endfor %} +
+ {% else %} + {{ messages|first }} + {% endif %} + {% if type == 'error' %} +
+ {% endif %}
- {% endif %} + {# Remove type specific classes. #} + {% set attributes = attributes.removeClass(classes) %} + {% endfor %}
- {# Remove type specific classes. #} - {% set attributes = attributes.removeClass(classes) %} -{% endfor %} {% endblock messages %} -
+