From e2fda34984d10a8f948f72274d1141c1acf6e7e4 Mon Sep 17 00:00:00 2001 From: Brieuc-brd Date: Thu, 11 Apr 2024 16:30:06 +0200 Subject: [PATCH] [FIX] website_sale: adjust custom dropdown caret Prior to this commit, the custom dropdown caret in the `website_sale` sidebar didn't handle the "multiple" attribute, unlike the default dropdown. If we decided to add a "multiple" attribute to this element, the caret remained displayed, which created a design issue. This commit adapts the caret of this dropdown so that it works correctly when this attribute is defined. task-3702675 Part-of: odoo/odoo#150886 --- .../static/src/scss/product_configurator.scss | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/addons/website_sale/static/src/scss/product_configurator.scss b/addons/website_sale/static/src/scss/product_configurator.scss index 9ce919ce747..6a06ac47d41 100644 --- a/addons/website_sale/static/src/scss/product_configurator.scss +++ b/addons/website_sale/static/src/scss/product_configurator.scss @@ -80,11 +80,18 @@ option.css_not_available { $-arrow-url: url("data:image/svg+xml;utf8,"); select.form-select.css_attribute_select { - background-image: str-replace($-arrow-url, "#000", str-replace(#{$input-color}, "#", "%23")); - background-size: 20px; - background-position: 100% 65%; - background-repeat: no-repeat; max-width: 400px; + + &:not([multiple]):where(:not([size]), [size="1"]) { + background-image: str-replace($-arrow-url, "#000", str-replace(#{$input-color}, "#", "%23")); + background-size: 20px; + background-position: 100% 65%; + background-repeat: no-repeat; + + &:disabled { + background-image: str-replace($-arrow-url, "#000", str-replace(#{$form-select-disabled-color}, "#", "%23")); + } + } } // In the case of a modal, we cannot rely on '$input-color' to define the color // of the select arrow because '$input-color' is set based on the background