From c677040dede582eed548266b60313709462adfcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souk=C3=A9ina=20Bojabza?= Date: Tue, 4 Oct 2022 11:22:30 +0000 Subject: [PATCH] [IMP] web_editor: manage better the content bigger than one grid cell In grid mode, when a grid item width is one (grid) column, if its content is bigger than a column size, it makes the column grow with it while the other ones are shrinking. This issue was solved in [1] by using the `word-break` property but it is not the best solution. This commit fixes the issue by setting the `min-width` property to 0 instead. [1]: https://github.com/odoo/odoo/pull/93144 task-2973198 X-original-commit: 5d37ada861bf5de348de54d5d7de0d06e14ed28e Part-of: odoo/odoo#102525 --- .../static/src/scss/web_editor.frontend.scss | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/addons/web_editor/static/src/scss/web_editor.frontend.scss b/addons/web_editor/static/src/scss/web_editor.frontend.scss index 22dc219d083..c1ec4ed7908 100644 --- a/addons/web_editor/static/src/scss/web_editor.frontend.scss +++ b/addons/web_editor/static/src/scss/web_editor.frontend.scss @@ -59,6 +59,7 @@ > * { width: 100%; + min-width: 0; margin: 0 !important; padding: var(--grid-item-padding-y) var(--grid-item-padding-x) !important; } @@ -68,12 +69,8 @@ --gutter-x: 30px; } -.o_grid_item { - word-break: break-word; - - &.o_grid_item_image > img:not([data-shape]) { - width: 100% !important; - height: 100% !important; - object-fit: cover !important; - } +.o_grid_item_image > img:not([data-shape]) { + width: 100% !important; + height: 100% !important; + object-fit: cover !important; }