diff options
| author | stefanorigano (SRI) <sri@odoo.com> | 2020-05-28 10:04:53 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-06-02 15:29:50 +0000 |
| commit | aa867ba70255b958e2bafc49f5533befd182547a (patch) | |
| tree | 6cda02eb469a86ba36a5219f3874acb59b45ff14 /addons/web_editor/static/src | |
| parent | e505ed2833cadc9be73c5d193f4d63a9cfb48491 (diff) | |
[IMP] website, *: define 17 generic color palettes
*: web_editor
Those will be shared by all themes.
Part of https://github.com/odoo/odoo/pull/52224
task-2197038
closes odoo/odoo#52224
Related: odoo/design-themes#290
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src')
| -rw-r--r-- | addons/web_editor/static/src/scss/secondary_variables.scss | 8 | ||||
| -rw-r--r-- | addons/web_editor/static/src/scss/web_editor.variables.scss | 5 |
2 files changed, 5 insertions, 8 deletions
diff --git a/addons/web_editor/static/src/scss/secondary_variables.scss b/addons/web_editor/static/src/scss/secondary_variables.scss index 6d975a1fecd..ad3fae0db28 100644 --- a/addons/web_editor/static/src/scss/secondary_variables.scss +++ b/addons/web_editor/static/src/scss/secondary_variables.scss @@ -4,7 +4,7 @@ //------------------------------------------------------------------------------ // Color combinations -$o-color-combinations: nth($o-color-combinations-presets, $o-color-combinations-preset-number) !default; +$o-color-combinations: if($o-color-combinations-preset-number <= length($o-color-combinations-presets), nth($o-color-combinations-presets, $o-color-combinations-preset-number), ()) !default; $-combination-additions: (); @for $index from 1 through length($o-color-combinations) { $combination: map-merge($o-base-color-combination, nth($o-color-combinations, $index)); @@ -17,13 +17,13 @@ $-combination-additions: (); } // Colors -$o-color-palette: nth($o-color-palettes, $o-color-palette-number) !default; +$o-color-palette: if($o-color-palette-number <= length($o-color-palettes), nth($o-color-palettes, $o-color-palette-number), ()) !default; // Original color palette can contain override of the default combinations (so keep 'null' values for this merge) $o-color-palette: map-merge($-combination-additions, $o-color-palette); $o-color-palette: map-merge($o-base-color-palette, o-map-omit($o-color-palette)); // Theme colors -$o-theme-color-palette: nth($o-theme-color-palettes, $o-theme-color-palette-number) !default; +$o-theme-color-palette: if($o-theme-color-palette-number <= length($o-theme-color-palettes), nth($o-theme-color-palettes, $o-theme-color-palette-number), ()) !default; @if not $o-support-13-0-color-system { $o-theme-color-palette: map-remove($o-theme-color-palette, 'alpha', 'beta', 'gamma', 'delta', 'epsilon'); } @@ -46,7 +46,7 @@ $o-theme-color-palette: map-merge($o-base-theme-color-palette, o-map-omit($o-the // Gray colors // Extend grays with transparent ones (for some reason, BS4 create black-50 and // white-50 but does not allow overridding that with variables). -$o-gray-color-palette: nth($o-gray-color-palettes, $o-gray-color-palette-number) !default; +$o-gray-color-palette: if($o-gray-color-palette-number <= length($o-gray-color-palettes), nth($o-gray-color-palettes, $o-gray-color-palette-number), ()) !default; $o-gray-color-palette: map-merge($o-transparent-grays, o-map-omit($o-gray-color-palette)); $o-gray-color-palette: map-merge($o-base-gray-color-palette, o-map-omit($o-gray-color-palette)); 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 864413a9dd7..b8eb74167cf 100644 --- a/addons/web_editor/static/src/scss/web_editor.variables.scss +++ b/addons/web_editor/static/src/scss/web_editor.variables.scss @@ -359,7 +359,6 @@ $o-theme-color-palettes: ( 'delta': #5B899E, 'epsilon': #E46F78, ), - (), ) !default; $o-theme-color-palette-number: 1 !default; @@ -393,9 +392,7 @@ $o-transparent-grays: ( 'white-75': rgba(white, 0.75), 'white-85': rgba(white, 0.85), ) !default; -$o-gray-color-palettes: ( - (), (), -) !default; +$o-gray-color-palettes: () !default; $o-gray-color-palette-number: 1 !default; // Color combinations |
