From a66fe998003d9f9ef2e05ad955478636ef0d01fb Mon Sep 17 00:00:00 2001 From: mano-odoo Date: Thu, 23 Nov 2023 13:34:20 +0100 Subject: [PATCH] [FIX] web: kanbancard reestablish 16.0 outline effect Since milk redesign the kanbancard lost their outline bottom on focus state. Previous fixes where applied to solve this issue in commit[1] and commit[2]. These fixes were a Catch-22: fixing a behavior here, creating an issue there (double borders, issue on drag..) which lead to more custom code. In this commit, we remove the code added by the previous fixes and apply a solution used in version 16.0 and prior. Relying on a negative margin to hide the border of the following `kanban_record` and applying an outline effect and a greater `z-index` on focus to make it appear on top of the border. This z-index is set to 2 to compensate the `z-index-1` on the kanban column when a card is focused and dragged. [1]: odoo/odoo@d8fcc218bc70caff4f4368309d7aa3be8b8ddaa5 [2]: odoo/odoo@2495bfa7259dcbd482b10c95a55313f86d594fcb task-3580229 closes odoo/odoo#148869 X-original-commit: ca388322327379e470e76f3a3c6ee2b2271e3895 Signed-off-by: Pierre Paridans (app) --- addons/web/static/src/views/kanban/kanban_controller.scss | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/web/static/src/views/kanban/kanban_controller.scss b/addons/web/static/src/views/kanban/kanban_controller.scss index f548c1e9372..d9a0663eab4 100644 --- a/addons/web/static/src/views/kanban/kanban_controller.scss +++ b/addons/web/static/src/views/kanban/kanban_controller.scss @@ -77,6 +77,7 @@ .o_kanban_record { position: relative; min-width: 150px; + margin: 0 0 (-$border-width); > div:not(.o_dropdown_kanban) { padding: var(--KanbanRecord-padding-v) var(--KanbanRecord-padding-h); @@ -392,6 +393,8 @@ &:focus-visible, &:focus-within { + z-index: 2; + @include global-click-selector { outline: thin solid mix($o-main-link-color, map-get($grays, "300")); outline-offset: -1px; @@ -489,10 +492,6 @@ .o_kanban_record { width: 100%; - - & + .o_kanban_record:not(.o_dragged) .oe_kanban_card { - border-top: none; - } } .o_kanban_group {