aboutsummaryrefslogtreecommitdiffstats
path: root/src/styles/tabs.scss
blob: 16318b9f6d083f81c3644f70eb6bd76d1092c5f3 (plain) (blame)
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
@import './config.scss';

.theme__dark .tab-item {
  &.is-active {
    background: $dark-theme-gray;

    .tab-item__icon {
      margin-left: -4px;
    }
  }

  &.is-disabled .tab-item__icon {
    filter: grayscale(100%) opacity(0.2);
  }
  .tab-item__icon {
    width: 34px;
  }
}

.tabs {
  display: flex;
  flex-direction: column;
  flex-shrink: 1;

  .placeholder {
    height: 40px;
    width: 100%;
  }
}

.tab-item {
  align-items: center;
  display: flex;
  height: 65px;
  justify-content: center;
  min-height: 50px;
  position: relative;
  @media (prefers-reduced-motion: no-preference) {
    transition: background $theme-transition-time;
  }
  width: $theme-sidebar-width;

  &.is-active {
    background: change-color(
      $theme-brand-primary,
      $lightness: min(lightness($theme-brand-primary) * 1.35, 100)
    );
    border-left-width: 4px;
    border-left-style: solid;
    color: $theme-brand-primary;

    .tab-item__icon {
      margin-left: -4px;
    }
  }

  &.is-disabled .tab-item__icon {
    filter: grayscale(100%) opacity(0.2);
  }
  &.has-custom-icon .tab-item__icon {
    border-radius: $theme-border-radius;
  }
  &:active .tab-item__icon {
    opacity: 0.7;
  }

  .tab-item__icon {
    height: auto;
    width: 30px;
  }

  .tab-item__message-count {
    align-items: center;
    background: $theme-brand-danger;
    border-radius: 20px;
    bottom: 8px;
    color: #fff;
    display: flex;
    font-size: 11px;
    justify-content: center;
    min-height: 17px;
    min-width: 17px;
    padding: 0px 5px;
    position: absolute;
    right: 8px;

    &.is-indirect {
      padding-top: 0;
      background: #0088cc;
    }
    &.hibernating {
      padding-top: 0;
      background: $theme-gray;
      font-size: 0px;
      min-height: 10px;
      min-width: 10px;
      right: auto;
      left: 8px;
    }
  }

  .tab-item__info-badge {
    align-items: center;
    background: $theme-gray-light;
    bottom: 8px;
    border-radius: 20px;
    color: $theme-gray-lighter;
    display: flex;
    font-size: 11px;
    height: 17px;
    justify-content: center;
    padding: 0px 5px;
    position: absolute;
    right: 8px;
    width: 17px;

    &.is-indirect {
      padding-top: 0;
      background: #0088cc;
    }
  }

  .tab-item__shortcut-index {
    align-items: center;
    background: $theme-gray-light;
    bottom: 8px;
    color: #fff;
    display: flex;
    font-size: 11px;
    min-height: 17px;
    padding: 0px 5px;
    position: absolute;
    left: 8px;
  }

  &.is-reordering {
    z-index: 99999;
  }
}