[FIX] mass_mailing, web_editor: increase mail clients compatibility

Following bee3253b44, this commit is made
to increase the mail clients compatibility for the mails that are
created with the odoo mail editor.

Three new problems are handled:

- Font family of titles had to be forced too as outlook was not
  inheriting parent font family on those either.

- Default text font-size had to be forced as was not detected in
  transcoding correctly.

- text-decoration rule was decomposed in text-decoration(-line,
  -style and -color) in transcoding. Outlook is ignoring those
  three rules for some reason. As the decomposition is useless,
  the transcoder now forces the recomposition of these three rules.
This commit is contained in:
qsm-odoo
2017-05-17 11:29:24 +02:00
parent 5bbe4a8ce7
commit a83f812357
2 changed files with 15 additions and 2 deletions
@@ -55,9 +55,12 @@
background-color: @o_mm_def_color_alpha;
padding: 24px 3%;
// Forces on <p/> elements as several mail clients does not correctly
// inherit font properties
// Forces on <p/> and <hx/> elements as several mail clients does not
// correctly inherit font properties
&, p {
font-size: 14px; // force bootstrap default
}
&, p, h1, h2, h3, h4, h5, h6 {
font-family: @o_mm_def_font;
color: lighten(@o_mm_def_text_color, 20%);
}
@@ -121,6 +121,16 @@ var getMatchedCSSRules = function (a) {
}
});
// text-decoration rule is decomposed in -line, -color and -style. This is
// however not supported by many browser/mail clients and the editor does
// not allow to change -color and -style rule anyway
if (style['text-decoration-line']) {
style['text-decoration'] = style['text-decoration-line'];
delete style['text-decoration-line'];
delete style['text-decoration-color'];
delete style['text-decoration-style'];
}
return style;
};