summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2021-04-09 14:56:42 +0000
committerNicolas Lempereur <nle@odoo.com>2021-04-09 16:56:55 +0000
commitba50228f0e19dae6da1e252380a948f46887890c (patch)
tree4a7ebdc196c99fc9f54b955cb0c166d939c5bd29
parent3f790e0482bb7e0a36f65aece18249306da39067 (diff)
[FIX] web_editor: have transcoder apply text-decoration
The transcoder (transforming CSS rules into inline CSS for mail clients) was not working for text-decoration property because it would transform text-decoration values in: {'text-decoration-thickness': 'normal', 'text-decoration': none} And the regex that ensures we don't add duplicates check if there is: "(^|;)\s*text-decoration" so if there is text-decoration-thickness, text-decoration is not added. The regexp could be changed to: "(^|;)\s*text-decoration[^\w-]" but we already have special case for other text-decoration-* properties. With this change we should get text-decoration applied in: - edit mode (was already the case) - readonly mode (new) - mail client (only if mail client does not override it) As a side note: text-decoration-thickness seems to be rather new[^1] so at one point in time there was probably no issue. [^1]: https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness opw-2496490 closes odoo/odoo#69074 X-original-commit: f4f1b890e15e98d9a7e72586faf73327d3f7b716 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Co-authored-by: Kamen Zhekov <kzh@odoo.com>
-rw-r--r--addons/web_editor/static/src/js/backend/convert_inline.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/backend/convert_inline.js b/addons/web_editor/static/src/js/backend/convert_inline.js
index 13c7c68128b..526a0e8d0a2 100644
--- a/addons/web_editor/static/src/js/backend/convert_inline.js
+++ b/addons/web_editor/static/src/js/backend/convert_inline.js
@@ -162,6 +162,7 @@ function getMatchedCSSRules(a) {
delete style['text-decoration-line'];
delete style['text-decoration-color'];
delete style['text-decoration-style'];
+ delete style['text-decoration-thickness'];
}
// text-align inheritance does not seem to get past <td> elements on some