summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/components/messaging_menu/messaging_menu.scss
blob: e578218a1660f1fe5445a70767d8891218d1cd3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
// ------------------------------------------------------------------
// Layout
// ------------------------------------------------------------------

.o_MessagingMenu_counter {
    position: relative;
    transform: translate(-5px, -5px);
    margin-right: -10px; // "cancel" right padding of systray items
}

.o_MessagingMenu_dropdownMenu {
    display: flex;
    flex-flow: column;
    padding-top: 0;
    padding-bottom: 0;
    overflow-y: auto;
    /**
     * Override from bootstrap .dropdown-menu to fix top alignment with other
     * systray menu.
     */
    margin-top: map-get($spacers, 0);

    &.o-messaging-not-initialized {
        align-items: center;
        justify-content: center;
    }

    &:not(.o-mobile) {
        flex: 0 1 auto;
        width: 350px;
        min-height: 50px;
        max-height: 400px;
        z-index: 1100; // on top of chat windows
    }

    &.o-mobile {
        flex: 1 1 auto;
        position: fixed;
        top: $o-mail-chat-window-header-height-mobile;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        margin: 0;
        max-height: none;
    }
}

.o_MessagingMenu_dropdownMenuHeader {

    &:not(.o-mobile) {
        display: flex;
        flex-shrink: 0; // Forces Safari to not shrink below fit content
    }

    &.o-mobile {
        display: grid;
        grid-template-areas:
            "top"
            "bottom";
        grid-template-rows: auto auto;
        padding: 5px
    }
}

.o_MessagingMenu_dropdownLoadingIcon {
    margin-right: 3px;
}

.o_MessagingMenu_icon {
    font-size: larger
}

.o_MessagingMenu_loading {
    font-size: small;
    position: absolute;
    bottom: 50%;
    right: 0;
}

.o_MessagingMenu_newMessageButton.o-mobile {
    grid-area: top;
    justify-self: start;
}

.o_MessagingMenu_mobileNewMessageInput {
    grid-area: bottom;
    padding: 8px;
    margin-top: 10px
}

.o_MessagingMenu_notificationList.o-mobile {
    flex: 1 1 auto;
    overflow-y: auto;
}


// ------------------------------------------------------------------
// Style
// ------------------------------------------------------------------

// Make hightlight more consistent, due to messaging menu looking quite similar to discuss app in mobile
.o_MessagingMenu.o-is-open {
    background-color: rgba(black, 0.1);
}

.o_MessagingMenu_counter {
    background-color: $o-enterprise-primary-color;
}

.o_MessagingMenu_dropdownMenu.o-mobile {
    border: 0;
}

.o_MessagingMenu_dropdownMenuHeader {
    border-bottom: 1px solid gray('400');
    z-index: 1;
}

.o_MessagingMenu_mobileNewMessageInput {
    appearance: none;
    border: 1px solid gray('400');
    border-radius: 5px;
    outline: none;
}

.o_MessagingMenu_tabButton.o-desktop {

    &.o-active {
        font-weight: bold;
    }

    &:not(:hover) {

        &:not(.o-active) {
            color: gray('500');
        }
    }
}

.o_MessagingMenu_toggler.o-no-notification {
    @include o-mail-systray-no-notification-style();
}