From c343f3ed3eca34bd3520b00ff8e55757f59d0866 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 24 Nov 2021 14:26:16 +0000 Subject: [PATCH] Prevent flash messages from expanding offscreen Because we are using an edge-to-edge layout for the flash messages, the negative margins on the row were expanding the element offscreen. Bootstrap provides a "no-gutter" class for removing these margins, but that also drops the spacing between columns which we want to preserve. So instead we use a margin override on the row only. Additionally, drop some padding css in favour of a utility class Fixes #3351 Bug was introduced in 3dd639c8d02677b773935aa982ba0c9f3cc209e5 --- app/assets/stylesheets/common.scss | 2 -- app/views/layouts/_flash.html.erb | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index f2afdcf7a..87f262ff0 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -1312,8 +1312,6 @@ tr.turn:hover { /* Rules for "flash" notice boxes shown at the top of the content area */ .flash { - padding: $lineheight; - &.error { background-color: #ff7070; } diff --git a/app/views/layouts/_flash.html.erb b/app/views/layouts/_flash.html.erb index f8eabaeb3..5dda3ad5c 100644 --- a/app/views/layouts/_flash.html.erb +++ b/app/views/layouts/_flash.html.erb @@ -1,5 +1,5 @@ <% if flash[:error] %> -
+
" type="image/svg+xml" /> @@ -11,7 +11,7 @@ <% end %> <% if flash[:warning] %> -
+
" type="image/svg+xml"> @@ -23,7 +23,7 @@ <% end %> <% if flash[:notice] %> -
+
" type="image/svg+xml"> -- 2.39.5