summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/components/discuss_sidebar_item/discuss_sidebar_item.scss
blob: aebc4b9a1bb2125293bd82af4d2db0bc1b4ef804 (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
// ------------------------------------------------------------------
// Layout
// ------------------------------------------------------------------

.o_DiscussSidebarItem {
    display: flex;
    align-items: center;
    padding: map-get($spacers, 1) 0;

    &:hover .o_DiscussSidebarItem_commands {
        display: flex;
    }
}

.o_DiscussSidebarItem_activeIndicator {
    width: $o-mail-discuss-sidebar-active-indicator-width;
    align-self: stretch;
    flex: 0 0 auto;
}

.o_DiscussSidebarItem_command {
    margin-left: 3px;
    margin-right: 3px;

    &:first-child {
        margin-left: 0px;
    }

    &:last-child {
        margin-right: 0px;
    }
}

.o_DiscussSidebarItem_commands {
    display: none;
}

.o_DiscussSidebarItem_item {
    margin-left: 3px;
    margin-right: 3px;

    &:first-child {
        margin-left: 0px;
        margin-right: $o-mail-discuss-sidebar-active-indicator-margin-right;
    }

    &:last-child {
        margin-right: $o-mail-discuss-sidebar-scrollbar-width;
    }
}

.o_DiscussSidebarItem_name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    &.o-editable {
        margin-left: $o-mail-discuss-sidebar-active-indicator-width + $o-mail-discuss-sidebar-active-indicator-margin-right;
        margin-right: $o-mail-discuss-sidebar-scrollbar-width;
    }
}

.o_DiscussSidebarItem_nameInput {
    width: 100%;
}

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

.o_DiscussSidebarItem {
    cursor: pointer;

    &:hover {
        background-color: darken(gray('900'), 5%);
    }

    &.o-starred-box {
        .o_DiscussSidebarItem_counter {
            border-color: gray('600');
            background-color: gray('600');
        }
    }
}

.o_DiscussSidebarItem_activeIndicator.o-item-active {
    background-color: $o-brand-primary;
}

.o_DiscussSidebarItem_command:not(:hover) {
    color: gray('600');
}

.o_DiscussSidebarItem_counter {
    background-color: $o-brand-primary;
}

.o_DiscussSidebarItem_name {

    &.o-item-unread {
        font-weight: bold;
    }
}

.o_DiscussSidebarItem_nameInput {
    outline: none;
    border: none;
    border-radius: 2px;
}