[FIX] mass_mailing: properly allow global customize separator colors

The design tab allows the customization of the separators' colors but
this is currently broken because it gets overridden by the default style
of the snippet, which has higher specificity.
Besides, the priority of styles was lost.

closes odoo/odoo#92174

X-original-commit: 098202ba584ca6ba3544ccd00397578f5deb12ad
Related: odoo/enterprise#27719
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
Antoine Guenet
2022-05-24 16:00:19 +02:00
parent 504ff2a674
commit a1e8d116d5
@@ -28,7 +28,7 @@ export const PRIORITY_STYLES = {
'a:not(.btn)': [],
'a.btn.btn-primary': [],
'a.btn.btn-secondary': [],
'hr': [],
'hr': ['border-top-color'],
};
export const RE_CSS_TEXT_MATCH = /([^{]+)([^}]+)/;
export const RE_SELECTOR_ENDS_WITH_GT_STAR = />\s*\*\s*$/;
@@ -75,7 +75,7 @@ export const splitCss = css => {
if (!stylesToWrite[selectorToWriteTo]) {
stylesToWrite[selectorToWriteTo] = [];
}
stylesToWrite[selectorToWriteTo].push([style, styles[style]]);
stylesToWrite[selectorToWriteTo].push([style, styles[style] + (styles.getPropertyPriority(style) === 'important' ? ' !important' : '')]);
}
}
}