diff options
| author | qsm-odoo <qsm@odoo.com> | 2018-09-07 11:51:12 +0200 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2018-09-07 13:57:14 +0200 |
| commit | 3444e0a0dae804bd70c3bc5d3033b9aa690a2b98 (patch) | |
| tree | 414a9dc8c04206ec98f5ebc47fb5c94b2147faa0 /addons/web_editor/static/src/scss/web_editor.variables.scss | |
| parent | c44fe912329e2d4c7541ed810526d4a069f930c4 (diff) | |
[FIX] web_editor, *: use explicit string keys for color maps
* website
```
$map: (
test: 1,
black: 2,
);
@debug map-get($map, 'test');
@debug map-get($map, test);
@debug map-get($map, 'black');
@debug map-get($map, black);
```
The above code leads to a:
1
1
null
2
This is because maps' keys can be *anything* in sass (even other maps).
In the example, the map is defined with unquoted `test` and `black` as
keys which are understood as the string 'test' and the *color* black.
When asking for the value for the 'black' string key... there isn't any.
This commit forces the use of quoted string as color maps' keys.
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.scss | 22 |
1 files changed, 11 insertions, 11 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 769c53c1609..e20636dc58e 100644 --- a/addons/web_editor/static/src/scss/web_editor.variables.scss +++ b/addons/web_editor/static/src/scss/web_editor.variables.scss @@ -231,23 +231,23 @@ $o-color-palette-number: 1; // Theme colors $o-theme-color-palettes: ( ( - alpha: $o-enterprise-primary-color, - beta: $o-enterprise-color, - gamma: #5C5B80, - delta: #5B899E, - epsilon: #E46F78, + 'alpha': $o-enterprise-primary-color, + 'beta': $o-enterprise-color, + 'gamma': #5C5B80, + 'delta': #5B899E, + 'epsilon': #E46F78, ), ) !default; $o-theme-color-palette-number: 1; // Greyscale transparent colours $o-transparent-grays: ( - black-25: rgba(black, 0.25), - black-50: rgba(black, 0.5), - black-75: rgba(black, 0.75), - white-25: rgba(white, 0.25), - white-50: rgba(white, 0.5), - white-75: rgba(white, 0.75), + 'black-25': rgba(black, 0.25), + 'black-50': rgba(black, 0.5), + 'black-75': rgba(black, 0.75), + 'white-25': rgba(white, 0.25), + 'white-50': rgba(white, 0.5), + 'white-75': rgba(white, 0.75), ) !default; $o-gray-color-palettes: ( ( |
