From e6648b95c403bc49de97cd47ab9ae6f467696936 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 13 Mar 2025 11:48:34 +0100 Subject: [PATCH] [IMP] runbot_merge: fix dropdown colors for dark mode Much like the alerts and tables bootstrap's dropdowns don't bother using CSS variables so don't react correctly to the color theme. Fix them up by updating their CSS rules to use the relevant variables. They can't be manipulated via their SCSS variables because there's a bunch of other pieces of code (e.g. odoo theming shit) which wants to manipulate the dropdown colors in SCSS so using CSS vars break them. --- runbot_merge/static/scss/revariable.scss | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/runbot_merge/static/scss/revariable.scss b/runbot_merge/static/scss/revariable.scss index 769632af..f7e020e3 100644 --- a/runbot_merge/static/scss/revariable.scss +++ b/runbot_merge/static/scss/revariable.scss @@ -68,10 +68,6 @@ h1, h2, h3, h4, h5, h6{ color: inherit; } -.dropdown-item, .dropdown-menu, .dropdown-menu a { - color: inherit; -} - .navbar-light { background-color: var(--body-bg); color: inherit; @@ -109,3 +105,16 @@ h1, h2, h3, h4, h5, h6{ } } } + +.dropdown-menu { + color: var(--body-color); + background-color: var(--body-bg); +} +.dropdown-item { + color: color-mix(in srgb, var(--link-color) 85%, var(--light)); + &:hover, &:focus { + color: color-mix(in srgb, var(--link-color), var(--dark)); + // TODO: doesn't work for statuses (doesn't combine with .bg-{category} + background-color: oklch(from var(--dark) l c h / 0.1); + } +}