summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/scss/web_editor.variables.scss
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2020-05-28 10:04:46 +0000
committerqsm-odoo <qsm@odoo.com>2020-06-02 09:42:19 +0000
commit7736cde22c3bce06305045a818a2d70892cf25ef (patch)
tree2b42b79b891c9d569517b34eade2957fa174679d /addons/web_editor/static/src/scss/web_editor.variables.scss
parentade27dd08dd8a4aebebe04665171c1c39a00b338 (diff)
[IMP] web_editor, website, *: use new color names
*: mass_mailing, website_blog, website_forum, website_hr_recruitment Deprecate alpha, beta, gamma, delta and espilon color names and now use a new color system: o-color-x, with x from 1 to 5. This will allow to review the colors of all themes to have nice visuals for the new color combinations classes, without breaking the current uses of bg-alpha, alert-delta, etc in current websites of customers (by keeping the old color and classes for compatibility). This will also allow to uniformize all themes under the same conventions to enforce BS color override: - o-color-1 used as primary (as before, for alpha) - o-color-2 used as secondary (as before, for beta) Before, some themes were not following the 2 guidelines. The users using those themes will simply have the possibility to choose o-color-1 and o-color-2 colors accordingly to restore their website without breaking the new system features. Another change is that those colors are defined through color palettes and not theme color palettes. This will avoid them to generate automatic bootstrap classes which we don't want (alert, btn) and generate the one we want by ourself. Note: for mass mailing, the colors and classes also have been renamed but the system stays unchanged. Part of https://github.com/odoo/odoo/pull/45856 task-2197038
Diffstat (limited to 'addons/web_editor/static/src/scss/web_editor.variables.scss')
-rw-r--r--addons/web_editor/static/src/scss/web_editor.variables.scss63
1 files changed, 41 insertions, 22 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 3be0284d254..ab240268f62 100644
--- a/addons/web_editor/static/src/scss/web_editor.variables.scss
+++ b/addons/web_editor/static/src/scss/web_editor.variables.scss
@@ -2,6 +2,8 @@
/// This files regroups the variables and mixins which are specific to the editor.
///
+$o-support-13-0-color-system: false !default;
+
$o-we-font-family: Roboto, 'Montserrat', 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif !default;
$o-we-font-size: 13px;
@@ -310,21 +312,37 @@ $o-we-toolbar-height: 32px;
// palette once selected to ensure it works.
// Colors
-$o-base-color-palette: () !default;
+$o-base-color-palette: (
+ 'o-color-1': transparent,
+ 'o-color-2': transparent,
+ 'o-color-3': transparent,
+ 'o-color-4': transparent,
+ 'o-color-5': transparent,
+) !default;
$o-color-palettes: (
- (),
+ (
+ 'o-color-1': $o-enterprise-primary-color,
+ 'o-color-2': $o-enterprise-color,
+ 'o-color-3': #F6F6F6,
+ 'o-color-4': #FFFFFF,
+ 'o-color-5': #383E45,
+ ),
+ (
+ 'o-color-1': #337ab7,
+ 'o-color-2': #e9ecef,
+ 'o-color-3': #F8F9FA,
+ 'o-color-4': #FFFFFF,
+ 'o-color-5': #343a40,
+ ),
) !default;
$o-color-palette-number: 1 !default;
// Theme colors
-$o-base-theme-color-palette: (
- 'alpha': white,
- 'beta': white,
- 'gamma': white,
- 'delta': white,
- 'epsilon': white,
-) !default;
+$o-base-theme-color-palette: () !default;
$o-theme-color-palettes: (
+ // alpha -> epsilon are old color names kept for compatibility.
+ // They should not be used in the code base anymore and ideally they will
+ // not generate any classes for >= 13.4 databases.
(
'alpha': $o-enterprise-primary-color,
'beta': $o-enterprise-color,
@@ -332,6 +350,7 @@ $o-theme-color-palettes: (
'delta': #5B899E,
'epsilon': #E46F78,
),
+ (),
) !default;
$o-theme-color-palette-number: 1 !default;
@@ -366,7 +385,7 @@ $o-transparent-grays: (
'white-85': rgba(white, 0.85),
) !default;
$o-gray-color-palettes: (
- (),
+ (), (),
) !default;
$o-gray-color-palette-number: 1 !default;
@@ -389,26 +408,26 @@ $o-base-color-combination: (
$o-color-combinations-presets: (
(
(
- // See $o-base-color-combination
+ 'bg': 'o-color-4',
),
(
- 'bg': 'gamma',
- 'headings': 'alpha',
+ 'bg': 'o-color-3',
+ 'headings': 'o-color-1',
),
(
- 'bg': 'beta',
- 'btn-secondary': 'gamma',
+ 'bg': 'o-color-2',
+ 'btn-secondary': 'o-color-3',
),
(
- 'bg': 'alpha',
- 'link': 'epsilon',
- 'btn-primary': 'epsilon',
- 'btn-secondary': 'gamma',
+ 'bg': 'o-color-1',
+ 'link': 'o-color-5',
+ 'btn-primary': 'o-color-5',
+ 'btn-secondary': 'o-color-3',
),
(
- 'bg': 'epsilon',
- 'headings': 'delta',
- 'btn-secondary': 'gamma',
+ 'bg': 'o-color-5',
+ 'headings': 'o-color-4',
+ 'btn-secondary': 'o-color-3',
),
),
) !default;