[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
This commit is contained in:
committed by
qsm-odoo
parent
219990ca6d
commit
bf2416723a
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user