From 7eda17fd4db9d36dfe5f5f786a510c3c8566eabc Mon Sep 17 00:00:00 2001 From: Elisabeth Dickinson Date: Tue, 2 Aug 2022 12:41:42 +0000 Subject: [PATCH] [IMP] mass_mailing: alert snippet improved Structure and styling changed to allow padding X when this snippet is not inside another snippet. Otherwise the alert block, in w-100, didn't have any space between the edge of the email template and the block. The "Type" option wasn't working: as all the elements can be changed with other options anyway, the code for this one has been removed instead of trying to fix it. Part-of: odoo/odoo#95940 --- .../static/src/snippets/s_alert/000.scss | 26 ++++++----- .../mass_mailing/views/snippets/s_alert.xml | 43 ++++++++++--------- addons/mass_mailing/views/snippets_themes.xml | 4 +- 3 files changed, 40 insertions(+), 33 deletions(-) diff --git a/addons/mass_mailing/static/src/snippets/s_alert/000.scss b/addons/mass_mailing/static/src/snippets/s_alert/000.scss index 7675235e36a..ffb6ecb68aa 100644 --- a/addons/mass_mailing/static/src/snippets/s_alert/000.scss +++ b/addons/mass_mailing/static/src/snippets/s_alert/000.scss @@ -1,23 +1,29 @@ +.o_mail_snippet_general .s_mail_alert [class^="col-lg"]{ + padding-left: 0!important; + padding-right: 0!important; +} .s_mail_alert { - margin: $grid-gutter-width/2 0; - border-width: $alert-border-width; - border-style: solid; - border-radius: $alert-border-radius; - p, ul, ol { - &:last-child { - margin-bottom: 0; + .s_alert { + margin: auto; + border-width: $alert-border-width; + border-style: solid; + border-radius: $alert-border-radius; + p, ul, ol { + &:last-child { + margin-bottom: 0; + } } } - &.s_alert_sm { + .s_alert_sm { padding: $grid-gutter-width/3; font-size: $font-size-sm; } - &.s_alert_md { + .s_alert_md { padding: $grid-gutter-width/2; font-size: $font-size-base; } - &.s_alert_lg { + .s_alert_lg { padding: $grid-gutter-width; font-size: $font-size-lg; } diff --git a/addons/mass_mailing/views/snippets/s_alert.xml b/addons/mass_mailing/views/snippets/s_alert.xml index 22e2554baa4..83b0d889a00 100644 --- a/addons/mass_mailing/views/snippets/s_alert.xml +++ b/addons/mass_mailing/views/snippets/s_alert.xml @@ -1,43 +1,44 @@ diff --git a/addons/mass_mailing/views/snippets_themes.xml b/addons/mass_mailing/views/snippets_themes.xml index d9169983701..c2a9c6379be 100644 --- a/addons/mass_mailing/views/snippets_themes.xml +++ b/addons/mass_mailing/views/snippets_themes.xml @@ -433,7 +433,7 @@ -
+
25% 50% @@ -442,7 +442,7 @@
-
+