From 76369d33b74afdbe9daa2af9024c044be4c75d00 Mon Sep 17 00:00:00 2001 From: Brieuc-brd Date: Mon, 14 Mar 2022 09:42:32 +0000 Subject: [PATCH] [REF] mail: `ChatterTopbar`, review and simplify scss MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of the overall v16 SCSS optimization/restyle, task-2704984 task-2781992 closes odoo/odoo#86461 Signed-off-by: Alexandre Kühn (aku) --- .../chatter_topbar/chatter_topbar.scss | 80 ++----------------- .../chatter_topbar/chatter_topbar.xml | 30 +++---- 2 files changed, 21 insertions(+), 89 deletions(-) diff --git a/addons/mail/static/src/components/chatter_topbar/chatter_topbar.scss b/addons/mail/static/src/components/chatter_topbar/chatter_topbar.scss index 036e6fc6cc2..876010aff53 100644 --- a/addons/mail/static/src/components/chatter_topbar/chatter_topbar.scss +++ b/addons/mail/static/src/components/chatter_topbar/chatter_topbar.scss @@ -3,103 +3,33 @@ // ------------------------------------------------------------------ .o_ChatterTopbar { - display: flex; - flex-direction: row; - justify-content: space-between; - // We need the +1 to handle the status bar border-bottom. - // The var is called `$o-statusbar-height`, but is used on button, therefore - // doesn't include the border-bottom. // We use min-height to allow multiples buttons lines on mobile. - min-height: $o-statusbar-height + 1; -} - -.o_ChatterTopbar_actions { - border-bottom: $border-width solid; - display: flex; - flex: 1; - flex-direction: row; - flex-wrap: wrap-reverse; // reverse to ensure send buttons are directly above composer + min-height: $o-statusbar-height + $border-width; } .o_ChatterTopbar_button { margin-bottom: -$border-width; /* Needed to allow "overriding" of the bottom border */ } -.o_ChatterTopbar_buttonAttachmentsCountLoader { - margin-left: map-get($spacers, 1); -} - -.o_ChatterTopbar_buttonCount { - padding-left: map-get($spacers, 1); -} - .o_ChatterTopbar_buttonClose { - display: flex; - flex-shrink: 0; - justify-content: center; - align-items: center; - width: 34px; - height: 34px; -} - -.o_ChatterTopbar_followerListMenu { - display: flex; -} - -.o_ChatterTopbar_rightSection { - display: flex; - flex: 1 0 auto; - justify-content: flex-end; + width: $o-statusbar-height; } // ------------------------------------------------------------------ // Style // ------------------------------------------------------------------ -.o_ChatterTopbar_actions { - border-color: transparent; - - &.o-has-active-button { - border-color: $border-color; - } -} - .o_ChatterTopbar_button { - border-radius: 0; - &:hover, &:focus { - background-color: gray('200'); + background-color: $gray-200; } &.o-active { @include o-hover-text-color($o-brand-odoo, $link-hover-color); - background-color: gray('100'); - border-right-color: $border-color; - - &:not(:first-of-type), - &:first-of-type.o-bordered { - border-left-color: $border-color; - } - - &.o-bordered { - border-top-color: $border-color; - } + background-color: $gray-100; &:focus { - background-color: gray('200'); + background-color: $gray-200; } } } - -.o_ChatterTopbar_buttonClose { - border-radius: 0 0 10px 10px; - font-size: $font-size-lg; - background-color: gray('700'); - color: gray('100'); - cursor: pointer; - - &:hover { - background-color: gray('600'); - color: $white; - } -} diff --git a/addons/mail/static/src/components/chatter_topbar/chatter_topbar.xml b/addons/mail/static/src/components/chatter_topbar/chatter_topbar.xml index 3657adc02b2..fbf40a46ae1 100644 --- a/addons/mail/static/src/components/chatter_topbar/chatter_topbar.xml +++ b/addons/mail/static/src/components/chatter_topbar/chatter_topbar.xml @@ -3,14 +3,15 @@ -
-
+
+
- -
-
- @@ -67,9 +69,9 @@
-
- -
+