/
list.scss
232 lines (224 loc) · 5.25 KB
/
list.scss
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
/// list.scss -*- Mode: scss; indent-tabs-mode: nil; basic-offset: 2 -*-
@import 'extends';
// List item label
md-list-item {
.md-list-item-inner {
flex-grow: 1; // use all column space
}
md-icon,
.md-button md-icon {
margin-left: 0;
}
.sg-item-name {
font-size: sg-size(button);
max-width: 75%; // leave some place for a secondary button
text-transform: initial;
overflow: hidden;
align-items: flex-start;
text-overflow: ellipsis;
white-space: nowrap;
}
.sg-inline-list-icon-label {
text-transform: uppercase;
}
}
// Add some padding to the first icon in a list item
//.md-list-item-inner {
// > i:first-child {
// margin-left: $mg;
// }
//}
// The right tile for a list item.
// ----------------------------------------------------------------------------
.md-tile-right {
padding-right: $item-padding-right;
}
// The right tile for a list item (avatar container)
// ----------------------------------------------------------------------------
.md-tile-left,
.md-tile-right {
border-radius: 100%;
padding: $layout-gutter-width;
width: $sg-md-grid-pitch + $baseline-grid;
height: $sg-md-grid-pitch + $baseline-grid;
line-height: $sg-md-grid-pitch + $baseline-grid;
background-clip: content-box;
}
.md-tile-right {
margin-right: -$layout-gutter-width;
}
// Overqualifying to override a rule in source
div.md-tile-left {
min-width: $sg-md-grid-pitch + $baseline-grid;
}
// Specific lists with a single subheader (sg-md-subheader--fixed) at the top
[id='messagesList'],
[id='contactsList'] {
border-top: 44px solid transparent; // padding for the header.subheader until md-subheader is fixed
}
.sg-section-list {
md-list-item {
transition: background-color $swift-ease-in-duration $swift-ease-in-timing-function,
color 0.12s linear;
&:hover:not([disabled]) {
background-color: sg-color($sogoPaper, 300);
color: sg-color($sogoBlue, 800);
cursor: pointer;
}
&:active {
color: sg-color($sogoBlue, 800);
}
&:focus,
&.sg-active {
background-color: sg-color($sogoBlue, 100);
}
.md-list-item-inner {
.md-secondary {
// Expect the container to include a sg-tile-icons
right: 0px;
}
}
}
}
.sg {
&-tile-content {
align-items: baseline;
flex-direction: row;
flex-wrap: wrap;
flex: 1;
justify-content: space-between;
p {
margin: $list-p-margin;
font-size: sg-size(body);
}
.msg-date {
float: right;
font-size: sg-size(body);
font-weight: $sg-font-light;
line-height: $sg-line-height-2;
margin-left: 1em;
}
.#{$md}-subhead-multi,
.#{$md}-subhead-solo,
.#{$md}-body-multi {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.#{$md}-subhead-multi {
@extend .#{$md}-body-1;
font-size: initial;
}
.#{$md}-body-multi {
@extend .#{$md}-caption;
}
}
// Small tile of vertically-aligned icons
&-tile-icons {
md-icon {
font-size: $sg-font-size-1;
color: $colorGray;
margin: 2px;
}
display: flex;
flex-direction: column;
align-items: center;
justify-content: start;
width: (2 * $mg);
height:(7 * $line);
}
}
.sg-avatars {
margin: ($mg / 2) 0 0 ($mg / 2);
img {
border-radius: 100%;
margin-right: ($mg / 2);
}
}
// Avatar placeholder
// ------------------------------------
.md-tile-left:before {
font-family: 'Material Icons';
font-size: 40px;
color: rgba(0, 0, 0, 0.26);
}
.md-tile-left-card:before {
@extend .md-tile-left;
content: "\e7fd"; // person
}
.md-tile-left-list:before {
@extend .md-tile-left;
content: "\e7ef"; // group
}
.md-tile-left-selected:before {
@extend .md-tile-left;
content: "\e5ca"; // check
}
.md-tile-left-accepted:before {
@extend .md-tile-left;
background-color: rgba(0, 255, 0, 0.3) !important;
content: "\e5ca"; // check
color: rgba(0, 0, 0, 0.5);
}
.md-tile-left-declined:before {
@extend .md-tile-left;
background-color: rgba(255, 0, 0, 0.3) !important;
content: "\e15b"; // remove
color: rgba(0, 0, 0, 0.5);
}
.md-tile-left-delegated:before {
@extend .md-tile-left;
background-color: rgba(192, 192, 192, 0.3) !important;
content: "\e5c8"; // arrow-forward
color: rgba(0, 0, 0, 0.5);
}
.md-tile-left-needs-action:before {
@extend .md-tile-left;
background-color: rgba(255, 255, 0, 0.3) !important;
content: "?";
}
.md-tile-left-tentative:before {
@extend .md-tile-left;
background-color: rgba(255, 255, 0, 0.3) !important;
content: "\e7fd"; // person
}
.sg-avatar {
@extend .md-tile-left-card;
margin-right: 0;
margin-left: 0;
}
.sg-list-avatar {
@extend .md-tile-left-list;
margin-right: 0;
margin-left: 0;
}
.sg-selected-avatar {
@extend .md-tile-left-selected;
margin-right: 0;
margin-left: 0;
}
.sg-accepted {
@extend .md-tile-left-accepted;
margin-right: 0;
margin-left: 0;
}
.sg-declined {
@extend .md-tile-left-declined;
margin-right: 0;
margin-left: 0;
}
.sg-delegated {
@extend .md-tile-left-delegated;
margin-right: 0;
margin-left: 0;
}
.sg-needs-action {
@extend .md-tile-left-needs-action;
margin-right: 0;
margin-left: 0;
}
.sg-tentative {
@extend .md-tile-left-tentative;
margin-right: 0;
margin-left: 0;
}