summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/scss/web_editor.common.scss
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2018-06-28 17:54:40 +0200
committerqsm-odoo <qsm@odoo.com>2018-07-27 12:36:54 +0200
commit76f714dca8957233ba3bbca73f340fa21244f5f2 (patch)
tree277290260fcc328428b0c23a292d521a77a6d1b3 /addons/web_editor/static/src/scss/web_editor.common.scss
parentcd3f5bbfda76da75a9c7528144020c7dfbdf81d3 (diff)
[REF] web, web_editor, *: review theme color extensions
* survey, website_slides Before this commit, the web_editor app created bg and text classes its own way for theming (alpha, beta, grays, ...). Now the system is far more automatic by extending BS4 color maps.
Diffstat (limited to 'addons/web_editor/static/src/scss/web_editor.common.scss')
-rw-r--r--addons/web_editor/static/src/scss/web_editor.common.scss42
1 files changed, 5 insertions, 37 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 31ae70b766c..11fa94cd010 100644
--- a/addons/web_editor/static/src/scss/web_editor.common.scss
+++ b/addons/web_editor/static/src/scss/web_editor.common.scss
@@ -229,40 +229,8 @@ a.o_underline {
}
}
-// Create classes for theme colors...
-@include o-create-color-classes(alpha, $color-alpha);
-@include o-create-color-classes(beta, $color-beta);
-@include o-create-color-classes(gamma, $color-gamma);
-@include o-create-color-classes(delta, $color-delta);
-@include o-create-color-classes(epsilon, $color-epsilon);
-
-// ... and button classes
-@include o-create-color-btn-classes(alpha, $color-alpha);
-@include o-create-color-btn-classes(beta, $color-beta);
-@include o-create-color-btn-classes(gamma, $color-gamma);
-@include o-create-color-btn-classes(delta, $color-delta);
-@include o-create-color-btn-classes(epsilon, $color-epsilon);
-
-// Create classes for UI colors // FIXME
-@include o-create-color-classes(primary, theme-color('primary'));
-// @include o-create-color-classes(success, $state-success-bg, $content-color: $state-success-text);
-// @include o-create-color-classes(info, $state-info-bg, $content-color: $state-info-text);
-// @include o-create-color-classes(warning, $state-warning-bg, $content-color: $state-warning-text);
-// @include o-create-color-classes(danger, $state-danger-bg, $content-color: $state-danger-text);
-
-// Create classes for greyscale colors
-@include o-create-color-classes('black', $black);
-@include o-create-color-classes('gray-darker', gray('900')); // FIXME
-@include o-create-color-classes('gray-dark', gray('900'));
-@include o-create-color-classes('gray', gray('700'));
-@include o-create-color-classes('gray-light', gray('600'));
-@include o-create-color-classes('gray-lighter', gray('200'));
-@include o-create-color-classes('white', $white);
-
-// Create classes for greyscale transparent colours
-@include o-create-color-classes('black-25', $color-black-25);
-@include o-create-color-classes('black-50', $color-black-50);
-@include o-create-color-classes('black-75', $color-black-75);
-@include o-create-color-classes('white-25', $color-white-25);
-@include o-create-color-classes('white-50', $color-white-50);
-@include o-create-color-classes('white-75', $color-white-75);
+// Extend bootstrap to create background and text utilities for gray colors too
+@each $color, $value in $grays {
+ @include bg-variant(".bg-#{$color}", $value);
+ @include text-emphasis-variant(".text-#{$color}", $value);
+}