From 4ef0eac5ba134f462f72f3e9c60e5c9fc95f3a8c Mon Sep 17 00:00:00 2001
From: Andrea Ulliana <aul@odoo.com>
Date: Mon, 23 Sep 2019 08:04:25 +0000
Subject: [PATCH] [FIX] website, *: force website UI dropdown style

* web_editor

The purpose is to force our dropdown style in our UI so that themes do
not break it anymore (same way all the other elements are forced (cards,
headings, etc)).

task-2059538

closes odoo/odoo#38268

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
---
 .../static/src/scss/web_editor.variables.scss  | 18 ++++++++++++++++++
 addons/website/static/src/scss/website.ui.scss |  2 ++
 2 files changed, 20 insertions(+)

diff --git a/addons/web_editor/static/src/scss/web_editor.variables.scss b/addons/web_editor/static/src/scss/web_editor.variables.scss
index ef75f0f2cc9c..ed0aecca5e9f 100644
--- a/addons/web_editor/static/src/scss/web_editor.variables.scss
+++ b/addons/web_editor/static/src/scss/web_editor.variables.scss
@@ -227,6 +227,24 @@ $o-we-switch-inactive-color: $o-we-color-paper !default;
     }
 }
 
+@mixin o-w-preserve-dropdown-menus {
+    .dropdown-menu {
+        background-color: white;
+    }
+    .dropdown-item {
+        color: #212529;
+
+        @include hover-focus {
+            color: darken(#212529, 5%);
+        }
+        &.active,
+        &:active {
+            color: white;
+            @include gradient-bg($o-brand-primary);
+        }
+    }
+}
+
 // Edition colors
 
 // Colors
diff --git a/addons/website/static/src/scss/website.ui.scss b/addons/website/static/src/scss/website.ui.scss
index fe2187651741..4d49c2872e5b 100644
--- a/addons/website/static/src/scss/website.ui.scss
+++ b/addons/website/static/src/scss/website.ui.scss
@@ -15,6 +15,7 @@ body.o_connected_user {
 
 // MAIN MENU STYLE (added above navbar.scss)
 #oe_main_menu_navbar {
+    @include o-w-preserve-dropdown-menus;
     @include o-position-absolute(0, 0, auto, 0);
     position: fixed;
     z-index: $zindex-modal - 10;
@@ -107,6 +108,7 @@ body.o_connected_user {
 body .modal {
     &.o_technical_modal {
         @include o-w-preserve-base;
+        @include o-w-preserve-dropdown-menus;
         @include o-w-preserve-headings;
         @include o-w-preserve-forms;
         @include o-w-preserve-links;
-- 
GitLab