From 76f714dca8957233ba3bbca73f340fa21244f5f2 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Thu, 28 Jun 2018 17:54:40 +0200 Subject: [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. --- .../src/scss/web_editor.common.bootstrap.scss | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 addons/web_editor/static/src/scss/web_editor.common.bootstrap.scss (limited to 'addons/web_editor/static/src/scss/web_editor.common.bootstrap.scss') diff --git a/addons/web_editor/static/src/scss/web_editor.common.bootstrap.scss b/addons/web_editor/static/src/scss/web_editor.common.bootstrap.scss new file mode 100644 index 00000000000..b7ad30b1bc4 --- /dev/null +++ b/addons/web_editor/static/src/scss/web_editor.common.bootstrap.scss @@ -0,0 +1,28 @@ + +// Automatically extend bootstrap to create theme background/text/button classes +$theme-colors: () !default; +$theme-colors: map-merge(( + 'alpha': $color-alpha, + 'beta': $color-beta, + 'gamma': $color-gamma, + 'delta': $color-delta, + 'epsilon': $color-epsilon, +), $theme-colors); + +// Extend grays with transparent ones (for some reason, BS4 create black-50 and +// white-50 but does not allow overridding that with variables). Also add black +// and white ones too as they were also not added by BS4... +$grays: () !default; +$grays: map-merge(( + 'black-25': $color-black-25, + 'black-50': $color-black-50, + 'black-75': $color-black-75, + 'white-25': $color-white-25, + 'white-50': $color-white-50, + 'white-75': $color-white-75, + + // Note: those two needs to be redefined before bootstrap, otherwise they + // do not exist yet + 'black': $black, + 'white': $white, +), $grays); -- cgit v1.2.3