summaryrefslogtreecommitdiff
path: root/addons/web
diff options
context:
space:
mode:
authorSamuel Degueldre <sad@odoo.com>2020-10-28 13:56:52 +0000
committerSamuel Degueldre <sad@odoo.com>2021-01-07 17:45:50 +0000
commit6c199562ecce5d08bc5d971a920a20756f3cb098 (patch)
tree99ce035f644a687a524c5cd5b59b59baa449d241 /addons/web
parentf23806e1e768e65873ec578e5135a430ade7aa68 (diff)
[FIX] web_editor: fix icons losing classes when modifying them
Previously, when double clicking and image, video, icon, or document in the web-editor and replacing it with a different media type, it would lose its custom classes. This means among other things, that it would lose margins and paddings from bootstrap classes, or in the case of the three columns snippet, that the new media would not be properly rounded in its top corner, or not show up at all in the case of the video. The only exception was when changing any media type to an icon, but in that case it would also keep some of the media-specific classes that are supposed to be removed (eg img-fluid or media_iframe_video). This commit fixes that as well as some _clear behaviour that didn't remove all classes that had to be removed, eg some fa-classes would linger depending on their order, and the o_image class from documents would always remain Part of: odoo/odoo#60450 Linked to: #60432 #60443 task-2282542 closes odoo/odoo#64230 X-original-commit: 99531f5dd8966fc4ad89d1e9c2886ad701527f3a Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/web')
-rw-r--r--addons/web/static/src/scss/mimetypes.scss2
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/web/static/src/scss/mimetypes.scss b/addons/web/static/src/scss/mimetypes.scss
index f366f7eed97..678116e12ab 100644
--- a/addons/web/static/src/scss/mimetypes.scss
+++ b/addons/web/static/src/scss/mimetypes.scss
@@ -4,6 +4,8 @@
height: 38px;
background-image: url('/web/static/src/img/mimetypes/unknown.svg');
background-size: contain;
+ background-repeat: no-repeat;
+ background-position: center;
&[data-mimetype^='image'] {
background-image: url('/web/static/src/img/mimetypes/image.svg');