summaryrefslogtreecommitdiff
path: root/addons/mass_mailing/static/src/scss/themes
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-08-08 11:52:13 +0200
committerChristophe Simonis <chs@odoo.com>2019-08-08 11:52:13 +0200
commitb792ba7d9a80e856e3c69c2852e6d44b78d0e13f (patch)
treea3ee5b7ef9f9317866deeb2b3e5964020c87b8fb /addons/mass_mailing/static/src/scss/themes
parent22e0f88bce5bf162a6c67e915a3c27b101f74f2b (diff)
parent752b2553c6fad061ebf23e13585f7b7489b20840 (diff)
[MERGE] forward port branch saas-12.3 up to 752b2553c6f
Diffstat (limited to 'addons/mass_mailing/static/src/scss/themes')
-rw-r--r--addons/mass_mailing/static/src/scss/themes/theme_basic.scss29
-rw-r--r--addons/mass_mailing/static/src/scss/themes/theme_default.scss17
2 files changed, 33 insertions, 13 deletions
diff --git a/addons/mass_mailing/static/src/scss/themes/theme_basic.scss b/addons/mass_mailing/static/src/scss/themes/theme_basic.scss
index 00f3a6304bc..d65ea077f5f 100644
--- a/addons/mass_mailing/static/src/scss/themes/theme_basic.scss
+++ b/addons/mass_mailing/static/src/scss/themes/theme_basic.scss
@@ -1,3 +1,32 @@
+
+// TODO remove in master
+// Themes scss have to use bg-variant and text-emphasis-variant mixins of BS4
+// to properly work. That use was introduced as a fix in 12.0... but the BS4
+// mixins are unavailable in the mailing assets. As a stable fix cannot
+// introduce static code which requires an XML update to not crash, the mixins
+// were duplicated here instead.
+@mixin bg-variant($parent, $color) {
+ #{$parent} {
+ background-color: $color !important;
+ }
+ a#{$parent},
+ button#{$parent} {
+ &:hover, &:focus {
+ background-color: darken($color, 10%) !important;
+ }
+ }
+}
+@mixin text-emphasis-variant($parent, $color) {
+ #{$parent} {
+ color: $color !important;
+ }
+ a#{$parent} {
+ &:hover, &:focus {
+ color: darken($color, 10%) !important;
+ }
+ }
+}
+
// ============================
// Mass Mailing "Theme Basic"
// ============================
diff --git a/addons/mass_mailing/static/src/scss/themes/theme_default.scss b/addons/mass_mailing/static/src/scss/themes/theme_default.scss
index afd4057cfc9..4d49a7ef22c 100644
--- a/addons/mass_mailing/static/src/scss/themes/theme_default.scss
+++ b/addons/mass_mailing/static/src/scss/themes/theme_default.scss
@@ -24,19 +24,10 @@ $o-mm-def-btn-bg : $o-mm-def-color-gamma;
$o-mm-def-btn-text : $o-mm-def-color-beta;
// ===== Colors =====
-.bg-beta {
- background-color: $o-mm-def-color-zeta;
- color: $o-mm-def-color-beta;
-}
-.text-beta {
- color: $o-mm-def-color-zeta;
-}
-.bg-delta {
- background-color: $o-mm-def-color-eta;
-}
-.bg-gray-lighter {
- background-color: $o-mm-def-color-alpha;
-}
+@include bg-variant(".bg-beta", $o-mm-def-color-zeta);
+@include text-emphasis-variant(".text-beta", $o-mm-def-color-zeta);
+@include bg-variant(".bg-delta", $o-mm-def-color-eta);
+@include bg-variant(".bg-gray-lighter", $o-mm-def-color-alpha);
td:not([align]) {
// Default browser style but needed so that alignment works on some mail