Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/sessions/contrib/remoteAgentHost/browser/media/hostPickerDropdown.css
13406 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
/* ---- Mobile Host Picker bottom sheet ----
7
* Slides up from the bottom of the viewport over a translucent backdrop.
8
* Replaces the desktop context menu / anchored dropdown for the host
9
* picker on phone-sized layouts. */
10
11
.host-picker-sheet-overlay {
12
position: fixed;
13
inset: 0;
14
z-index: 2000;
15
display: flex;
16
flex-direction: column;
17
justify-content: flex-end;
18
pointer-events: none;
19
}
20
21
.host-picker-sheet-overlay > * {
22
pointer-events: auto;
23
}
24
25
.host-picker-sheet-backdrop {
26
position: absolute;
27
inset: 0;
28
background: rgba(0, 0, 0, 0.4);
29
animation: host-picker-sheet-fade-in 180ms ease-out;
30
}
31
32
.host-picker-sheet-backdrop.closing {
33
animation: host-picker-sheet-fade-out 180ms ease-in forwards;
34
}
35
36
.host-picker-sheet {
37
position: relative;
38
width: 100%;
39
max-height: 80vh;
40
display: flex;
41
flex-direction: column;
42
background: var(--vscode-menu-background, var(--vscode-editor-background));
43
color: var(--vscode-menu-foreground, var(--vscode-foreground));
44
border-top-left-radius: 16px;
45
border-top-right-radius: 16px;
46
padding-bottom: env(safe-area-inset-bottom);
47
box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25);
48
animation: host-picker-sheet-slide-up 220ms cubic-bezier(0.2, 0.9, 0.3, 1);
49
overflow: hidden;
50
}
51
52
.host-picker-sheet.closing {
53
animation: host-picker-sheet-slide-down 180ms ease-in forwards;
54
}
55
56
/* iOS-style drag-handle hint. Decorative — drag-to-dismiss is not wired up. */
57
.host-picker-sheet-handle {
58
width: 36px;
59
height: 4px;
60
margin: 8px auto 4px;
61
border-radius: 2px;
62
background: color-mix(in srgb, var(--vscode-foreground) 30%, transparent);
63
flex-shrink: 0;
64
}
65
66
.host-picker-sheet-header {
67
display: flex;
68
align-items: center;
69
gap: 8px;
70
padding: 8px 16px 4px;
71
flex-shrink: 0;
72
}
73
74
.host-picker-sheet-title {
75
flex: 1;
76
min-width: 0;
77
font-size: 16px;
78
font-weight: 600;
79
overflow: hidden;
80
text-overflow: ellipsis;
81
white-space: nowrap;
82
}
83
84
.host-picker-sheet-close {
85
display: flex;
86
align-items: center;
87
justify-content: center;
88
width: 36px;
89
height: 36px;
90
border: none;
91
background: transparent;
92
color: var(--vscode-foreground);
93
cursor: pointer;
94
border-radius: 50%;
95
flex-shrink: 0;
96
font-size: 16px;
97
padding: 0;
98
touch-action: manipulation;
99
}
100
101
.host-picker-sheet-close:active {
102
background: var(--vscode-toolbar-hoverBackground);
103
}
104
105
.host-picker-sheet-subtitle {
106
padding: 0 16px 12px;
107
color: var(--vscode-descriptionForeground);
108
font-size: 13px;
109
line-height: 1.4;
110
flex-shrink: 0;
111
}
112
113
.host-picker-sheet-body {
114
flex: 1 1 auto;
115
overflow-y: auto;
116
-webkit-overflow-scrolling: touch;
117
}
118
119
.host-picker-sheet-section-title {
120
padding: 12px 16px 4px;
121
font-size: 11px;
122
font-weight: 500;
123
text-transform: uppercase;
124
letter-spacing: 0.05em;
125
color: var(--vscode-descriptionForeground);
126
}
127
128
.host-picker-sheet-divider {
129
height: 1px;
130
margin: 8px 16px;
131
background: color-mix(in srgb, var(--vscode-foreground) 12%, transparent);
132
}
133
134
/* --- Host row -------------------------------------------------------- */
135
136
.host-picker-sheet-item {
137
display: flex;
138
align-items: center;
139
gap: 12px;
140
width: 100%;
141
min-height: 56px;
142
padding: 8px 16px;
143
border: none;
144
background: transparent;
145
color: inherit;
146
font-size: 15px;
147
text-align: left;
148
cursor: pointer;
149
touch-action: manipulation;
150
font-family: inherit;
151
}
152
153
.host-picker-sheet-item:focus {
154
outline: none;
155
}
156
157
.host-picker-sheet-item:focus-visible {
158
outline: 2px solid var(--vscode-focusBorder);
159
outline-offset: -2px;
160
}
161
162
.host-picker-sheet-item:active {
163
background: var(--vscode-toolbar-hoverBackground);
164
}
165
166
.host-picker-sheet-item.checked .host-picker-sheet-item-name {
167
font-weight: 600;
168
color: var(--vscode-menu-selectionForeground, var(--vscode-foreground));
169
}
170
171
.host-picker-sheet-item-icon {
172
position: relative;
173
width: 28px;
174
height: 28px;
175
display: flex;
176
align-items: center;
177
justify-content: center;
178
color: var(--vscode-foreground);
179
flex-shrink: 0;
180
}
181
182
.host-picker-sheet-item-icon .codicon {
183
font-size: 18px;
184
}
185
186
/* Small status dot in the bottom-right of the host icon. */
187
.host-picker-sheet-item-status {
188
position: absolute;
189
right: 0;
190
bottom: 0;
191
width: 8px;
192
height: 8px;
193
border-radius: 50%;
194
background: var(--vscode-descriptionForeground);
195
border: 2px solid var(--vscode-menu-background, var(--vscode-editor-background));
196
box-sizing: content-box;
197
}
198
199
.host-picker-sheet-item-status.connected {
200
background: var(--vscode-testing-iconPassed, var(--vscode-debugIcon-startForeground, #388a34));
201
}
202
203
.host-picker-sheet-item-status.connecting {
204
background: var(--vscode-debugIcon-startForeground, #388a34);
205
animation: host-picker-sheet-blink 1.2s ease-in-out infinite;
206
}
207
208
.host-picker-sheet-item-text {
209
flex: 1;
210
min-width: 0;
211
display: flex;
212
flex-direction: column;
213
gap: 2px;
214
}
215
216
.host-picker-sheet-item-name {
217
overflow: hidden;
218
text-overflow: ellipsis;
219
white-space: nowrap;
220
}
221
222
.host-picker-sheet-item-sub {
223
font-size: 12px;
224
color: var(--vscode-descriptionForeground);
225
overflow: hidden;
226
text-overflow: ellipsis;
227
white-space: nowrap;
228
}
229
230
.host-picker-sheet-item-check {
231
width: 20px;
232
display: flex;
233
align-items: center;
234
justify-content: center;
235
color: var(--vscode-textLink-foreground, var(--vscode-button-background));
236
font-size: 14px;
237
flex-shrink: 0;
238
}
239
240
/* --- Empty state ----------------------------------------------------- */
241
242
.host-picker-sheet-empty {
243
display: flex;
244
flex-direction: column;
245
align-items: center;
246
gap: 4px;
247
padding: 16px;
248
color: var(--vscode-descriptionForeground);
249
font-size: 13px;
250
text-align: center;
251
}
252
253
/* --- Footer (always-visible re-discover action) ---------------------- */
254
255
.host-picker-sheet-footer {
256
flex-shrink: 0;
257
border-top: 1px solid color-mix(in srgb, var(--vscode-foreground) 12%, transparent);
258
}
259
260
.host-picker-sheet-action {
261
display: flex;
262
align-items: center;
263
gap: 12px;
264
width: 100%;
265
min-height: 48px;
266
padding: 0 16px;
267
border: none;
268
background: transparent;
269
color: var(--vscode-textLink-foreground, var(--vscode-button-background));
270
font-size: 14px;
271
font-weight: 500;
272
text-align: left;
273
cursor: pointer;
274
touch-action: manipulation;
275
font-family: inherit;
276
}
277
278
.host-picker-sheet-action:active {
279
background: var(--vscode-toolbar-hoverBackground);
280
}
281
282
.host-picker-sheet-action[aria-disabled='true'] {
283
opacity: 0.6;
284
cursor: default;
285
}
286
287
.host-picker-sheet-action-icon {
288
width: 20px;
289
display: flex;
290
align-items: center;
291
justify-content: center;
292
font-size: 14px;
293
}
294
295
.host-picker-sheet-action.discovering .host-picker-sheet-action-icon .codicon {
296
animation: host-picker-sheet-spin 1.2s linear infinite;
297
}
298
299
@keyframes host-picker-sheet-slide-up {
300
from {
301
transform: translateY(100%);
302
}
303
to {
304
transform: translateY(0);
305
}
306
}
307
308
@keyframes host-picker-sheet-slide-down {
309
from {
310
transform: translateY(0);
311
}
312
to {
313
transform: translateY(100%);
314
}
315
}
316
317
@keyframes host-picker-sheet-fade-in {
318
from {
319
opacity: 0;
320
}
321
to {
322
opacity: 1;
323
}
324
}
325
326
@keyframes host-picker-sheet-fade-out {
327
from {
328
opacity: 1;
329
}
330
to {
331
opacity: 0;
332
}
333
}
334
335
@keyframes host-picker-sheet-blink {
336
0%, 100% {
337
opacity: 0.5;
338
}
339
50% {
340
opacity: 1;
341
}
342
}
343
344
@keyframes host-picker-sheet-spin {
345
from {
346
transform: rotate(0deg);
347
}
348
to {
349
transform: rotate(360deg);
350
}
351
}
352
353