From fdfb1c38f29c3d367657ad9d7ce9aed92e886655 Mon Sep 17 00:00:00 2001 From: Benjamin Vray Date: Fri, 1 Mar 2024 11:27:55 +0100 Subject: [PATCH] [FIX] web: fix colors contrast in searchbar input Steps to reproduce the bug: - Open the homepage and enter edit mode. - Click on the "Theme" tab. - Select the 4th color from the theme options and choose "black". - Drag and drop a "Search" snippet onto the page. - Save the page to exit edit mode. - Enter text in the searchbar input. - Bug: The text is not visible because its color is the same as the background color of the input. This bug appeared since this commit [1] where the "bg-light" class was added to the searchbar input. This caused the text color of the input, which by default is the same as the body color, to become invisible when the background color of the body is dark. To fix this, we now adjust the text color of the input based on the background color of the input. [1]: https://github.com/odoo/odoo/commit/6b1d11a60d8e70b33c63da860bb81b015ce5ea20 task-3751401 closes odoo/odoo#156042 Signed-off-by: Outagant Mehdi (mou) --- addons/web/static/src/scss/bootstrap_review_frontend.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/web/static/src/scss/bootstrap_review_frontend.scss b/addons/web/static/src/scss/bootstrap_review_frontend.scss index e0e83525dc4..53358451e7c 100644 --- a/addons/web/static/src/scss/bootstrap_review_frontend.scss +++ b/addons/web/static/src/scss/bootstrap_review_frontend.scss @@ -177,6 +177,9 @@ $o-navbar-nav-pills-link-border-radius: $nav-pills-border-radius !default; // on the 'currentColor' of the inputs. color: inherit; } +.form-control.bg-light { + color: adjust-color-to-background($input-color, $light); +} $-color-for-gray-200-bg: adjust-color-to-background($body-color, $gray-200); // Input group text (e.g. Date time picker)