From acd3da184831f13d5146c77b7e703815e24337dd Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Fri, 26 Feb 2016 11:27:08 +0100 Subject: [PATCH] [FIX] web_editor: bootstrap colors (text-, bg-) Bootstrap handles the primary color in a different way than the other colors. So to not break the backend UI, the o-create-color-classes mixin has to consider this difference. Notice that colors management should be further improved in the future. --- .../static/src/less/web_editor.common.less | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/web_editor/static/src/less/web_editor.common.less b/addons/web_editor/static/src/less/web_editor.common.less index a7dc0edb622..c46ad6a2576 100644 --- a/addons/web_editor/static/src/less/web_editor.common.less +++ b/addons/web_editor/static/src/less/web_editor.common.less @@ -242,7 +242,7 @@ a.o_underline { @color-delta: #0D6759; @color-epsilon: #0B2E59; -.o-create-color-classes(@class_name, @color, @complementary: contrast(@color, @text-color, #FFF, 60%)) { +.o-create-color-classes(@class_name, @color, @complementary: contrast(@color, @text-color, #FFF, 60%), @content-color: @color) { .bg-@{class_name} { background-color: @color; color: @complementary; @@ -251,7 +251,7 @@ a.o_underline { } } body .text-@{class_name} { // html to make the rules more important that bg-* ones - color: @color; + color: @content-color; } } @@ -264,10 +264,10 @@ a.o_underline { // Create classes for UI colors .o-create-color-classes(primary, @brand-primary); -.o-create-color-classes(success, @brand-success); -.o-create-color-classes(info, @brand-info); -.o-create-color-classes(warning, @brand-warning); -.o-create-color-classes(danger, @brand-danger); +.o-create-color-classes(success, @brand-success, @content-color: @state-success-text); +.o-create-color-classes(info, @brand-info, @content-color: @state-info-text); +.o-create-color-classes(warning, @brand-warning, @content-color: @state-warning-text); +.o-create-color-classes(danger, @brand-danger, @content-color: @state-danger-text); // Create classes for greyscale colors .o-create-color-classes(~'black', @gray-base);