From bf2416723ab4e13ad5920380bcb35b2e0a3da2f8 Mon Sep 17 00:00:00 2001 From: "stefanorigano (SRI)" Date: Mon, 11 Sep 2023 15:20:47 +0200 Subject: [PATCH] [IMP] web_editor: tweak lightness limit of `increase-contrast` Increases the function's maximum lightness amount from 15% to 20%. The new value is still arbitrary but provides better results with the default color palette. task-3097005 Part-of: odoo/odoo#120302 --- addons/web_editor/static/src/scss/web_editor.variables.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web_editor/static/src/scss/web_editor.variables.scss b/addons/web_editor/static/src/scss/web_editor.variables.scss index 6a25152f552..92cfb56c6eb 100644 --- a/addons/web_editor/static/src/scss/web_editor.variables.scss +++ b/addons/web_editor/static/src/scss/web_editor.variables.scss @@ -439,8 +439,8 @@ $o-color-extras-nesting-selector: '&, .o_colored_level &'; $lightness-c1: lightness($color1); $lightness-inc: if($luma-c1 < $luma-c2, -1%, 1%); $i: 0; - // Max 15% lightness change even if not contrasted enough - @while ($lightness-c1 > 0.1% and $lightness-c1 < 99.9% and $i < 15 and not has-enough-contrast($color1, $color2)) { + // Max 25% lightness change even if not contrasted enough + @while ($lightness-c1 > 0.1% and $lightness-c1 < 99.9% and $i < 25 and not has-enough-contrast($color1, $color2)) { $color1: adjust-color($color1, $lightness: $lightness-inc); $lightness-c1: $lightness-c1 + $lightness-inc; $i: $i + 1;