-
Notifications
You must be signed in to change notification settings - Fork 9.3k
/
_repository-list.scss
206 lines (170 loc) · 4.64 KB
/
_repository-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
@import '../mixins';
.repository-list {
height: 100%;
display: flex;
flex-direction: row;
/**
* Inherit the min-width from the ToolbarDropdown so that the repositories
* list will always be the width of the button. Otherwise, if the Add
* Repository foldout was open, it'd be taken into account as part of the
* width and the list wouldn't be the same width as the button.
*/
min-width: inherit;
/**
* Container for repository list items in the sidebar
*
* Contains two elements, one 16x16 <svg class='octicon'> holding an octicon
* representing the repository type (local, private, public, fork)
* and one <div class='name'> holding the repository name.
*/
.repository-list-item {
padding: 0 var(--spacing);
// Layout the icon and repository name horizontally
display: flex;
flex-direction: row;
// This makes it so that both the icon and the repo name
// is vertically centered.
align-items: center;
// Necessary to limit the width of the repository
// name and truncate accordingly
width: 100%;
&:not(.group-repositories-by-owner) {
padding-left: 0;
}
.icon-for-repository {
// Some room between the icon and repository name
margin-right: var(--spacing-half);
// Always let the octicon dictate the amount of space it needs
flex-shrink: 0;
// Force the octicon width
width: 16px;
}
.name {
// Long repository names truncate and ellipse
@include ellipsis;
.prefix {
color: var(--text-secondary-color);
}
/* Used to highlight substring matches in filtered lists */
mark {
font-weight: bold;
/* Reset browser defaults */
background-color: inherit;
color: currentColor;
}
}
.repo-indicators {
margin-left: auto;
display: flex;
justify-content: flex-end;
align-items: center;
margin-right: var(--spacing-half);
}
.change-indicator-wrapper {
display: flex;
min-width: 12px;
justify-content: center;
align-items: center;
margin-left: var(--spacing-half);
.octicon {
color: var(--tab-bar-active-color);
width: auto;
}
&:not(.group-repositories-by-owner) {
margin-right: var(--spacing-half);
}
}
.ahead-behind {
height: 16px;
background: var(--list-item-badge-background-color);
color: var(--list-item-badge-color);
align-items: center;
margin-left: auto;
// Perfectly round semi circle ends with real tight
// padding on either side. Now in two flavors!
@include darwin {
height: 12px;
line-height: 12px;
}
@include win32 {
height: 13px;
line-height: 13px;
}
.octicon {
margin: 0;
height: 20px;
width: 12px;
}
}
}
.filter-list-group-header.group-repositories-by-owner {
padding-top: var(--spacing);
}
.new-repository-button {
flex-shrink: 0;
.octicon {
margin-left: 5px;
width: 9px;
height: 13px;
}
}
.no-items {
text-align: center;
padding: var(--spacing);
word-wrap: break-word;
.blankslate-image {
margin: 0 auto;
max-width: 300px;
min-width: auto;
}
.title {
font-weight: var(--font-weight-semibold);
}
.protip {
padding-top: var(--spacing-double);
padding-left: var(--spacing-double);
padding-right: var(--spacing-double);
text-align: center;
font-size: var(--font-size-sm);
.kbd-shortcut {
display: inline-block;
}
kbd {
border-radius: var(--border-radius);
border: var(--base-border);
border-color: $gray-300;
display: inline-block;
padding: 1px 2px;
line-height: 1;
min-height: 16px;
font-family: var(--font-family);
text-align: center;
}
}
}
}
.list-focus-container {
/** Ahead/behind badge colors when list item is selected but not focused */
.list-item.selected {
.repository-list-item {
.ahead-behind {
background: var(--list-item-selected-badge-background-color);
color: var(--list-item-selected-badge-color);
}
}
}
&.focus-within {
/** Ahead/behind badge colors when list item is selected and focused */
.list-item.selected {
.repository-list-item {
.ahead-behind {
background: var(--list-item-selected-active-badge-background-color);
color: var(--list-item-selected-active-badge-color);
}
}
}
.change-indicator {
color: var(--text-color);
}
}
}