[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) <mou@odoo.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user