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 a2f55ccd6e5..41c6c835f35 100644 --- a/addons/web_editor/static/src/js/backend/convert_inline.js +++ b/addons/web_editor/static/src/js/backend/convert_inline.js @@ -788,7 +788,8 @@ function normalizeRem($editable) { const remMatch = node.getAttribute('style').match(/[\d\.]+\s*rem/g); for (const rem of remMatch || []) { const remValue = parseFloat(rem.replace(/[^\d\.]/g, '')); - node.setAttribute('style', node.getAttribute('style').replace(rem, remValue * rootFontSize + 'px')); + const pxValue = Math.round(remValue * rootFontSize * 10) / 10; + node.setAttribute('style', node.getAttribute('style').replace(rem, pxValue + 'px')); } } }