From 79a8e4fe8fc0fea6ac4ebcff6b9cb797087e302e Mon Sep 17 00:00:00 2001 From: Benoit Socias Date: Thu, 10 Mar 2022 15:47:43 +0000 Subject: [PATCH] [FIX] web_editor: use valid properties for hovered custom outline button Since [1] the CSS property reset for hovered outline buttons is using invalid property values. After this commit the color and image are only reset on non-hover: - the `background-color` is already set to `none` by `.btn`, - the `background-image` is only set if defined on the button's style - there is no need to reset it. [1]: https://github.com/odoo/odoo/commit/a010c91b5ee119cf54ed1a68a6ea06b2bc5f3978 task-2633169 closes odoo/odoo#86699 X-original-commit: 8530235bff30bfcad55cf39927f0733d30fe2eee Signed-off-by: Quentin Smetz (qsm) --- .../static/src/scss/web_editor.common.scss | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/addons/web_editor/static/src/scss/web_editor.common.scss b/addons/web_editor/static/src/scss/web_editor.common.scss index d4de90c220f..f9300b326b3 100644 --- a/addons/web_editor/static/src/scss/web_editor.common.scss +++ b/addons/web_editor/static/src/scss/web_editor.common.scss @@ -793,15 +793,11 @@ blockquote { .btn-custom:hover, .btn-fill-custom:hover { filter: invert(0.2); } -.btn-outline-custom { - &:not(:hover) { - background-color: transparent !important; - background-image: none !important; - } - &:hover { - background-color: ''; - background-image: ''; - } +.btn-outline-custom:not(:hover) { + // Custom buttons have their fill color or gradient specified in their + // element style. They must only be shown on hover for outline buttons. + background-color: transparent !important; + background-image: none !important; } // Base snippet rules