Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/editor/contrib/suggest/browser/media/suggest.css
4800 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
/* Suggest widget*/
7
8
.monaco-editor .suggest-widget {
9
width: 430px;
10
z-index: 40;
11
display: flex;
12
flex-direction: column;
13
border-radius: 3px;
14
}
15
16
.monaco-editor .suggest-widget.message {
17
flex-direction: row;
18
align-items: center;
19
}
20
21
.monaco-editor .suggest-widget,
22
.monaco-editor .suggest-details {
23
flex: 0 1 auto;
24
width: 100%;
25
border-style: solid;
26
border-width: 1px;
27
border-color: var(--vscode-editorSuggestWidget-border);
28
background-color: var(--vscode-editorSuggestWidget-background);
29
}
30
31
.monaco-editor.hc-black .suggest-widget,
32
.monaco-editor.hc-black .suggest-details,
33
.monaco-editor.hc-light .suggest-widget,
34
.monaco-editor.hc-light .suggest-details {
35
border-width: 2px;
36
}
37
38
/* Styles for status bar part */
39
40
41
.monaco-editor .suggest-widget .suggest-status-bar {
42
box-sizing: border-box;
43
display: none;
44
flex-flow: row nowrap;
45
justify-content: space-between;
46
width: 100%;
47
font-size: 80%;
48
padding: 0 4px 0 4px;
49
border-top: 1px solid var(--vscode-editorSuggestWidget-border);
50
overflow: hidden;
51
}
52
53
.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar {
54
display: flex;
55
}
56
57
.monaco-editor .suggest-widget .suggest-status-bar .left {
58
padding-right: 8px;
59
}
60
61
.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label {
62
color: var(--vscode-editorSuggestWidgetStatus-foreground);
63
}
64
65
.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label {
66
margin-right: 0;
67
}
68
69
.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label::after {
70
content: ', ';
71
margin-right: 0.3em;
72
}
73
74
.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row > .contents > .main > .right > .readMore,
75
.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label > .contents > .main > .right > .readMore {
76
display: none;
77
}
78
79
.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover > .contents > .main > .right.can-expand-details > .details-label {
80
width: 100%;
81
}
82
83
/* Styles for Message element for when widget is loading or is empty */
84
85
.monaco-editor .suggest-widget > .message {
86
padding-left: 22px;
87
}
88
89
/** Styles for the list element **/
90
91
.monaco-editor .suggest-widget > .tree {
92
height: 100%;
93
width: 100%;
94
}
95
96
.monaco-editor .suggest-widget .monaco-list {
97
user-select: none;
98
-webkit-user-select: none;
99
}
100
101
/** Styles for each row in the list element **/
102
103
.monaco-editor .suggest-widget .monaco-list .monaco-list-row {
104
display: flex;
105
-mox-box-sizing: border-box;
106
box-sizing: border-box;
107
padding-right: 10px;
108
background-repeat: no-repeat;
109
background-position: 2px 2px;
110
white-space: nowrap;
111
cursor: pointer;
112
touch-action: none;
113
}
114
115
.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused {
116
color: var(--vscode-editorSuggestWidget-selectedForeground);
117
}
118
119
.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .codicon {
120
color: var(--vscode-editorSuggestWidget-selectedIconForeground);
121
}
122
123
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents {
124
flex: 1;
125
height: 100%;
126
overflow: hidden;
127
padding-left: 2px;
128
}
129
130
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main {
131
display: flex;
132
overflow: hidden;
133
text-overflow: ellipsis;
134
white-space: pre;
135
justify-content: space-between;
136
}
137
138
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left,
139
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right {
140
display: flex;
141
}
142
143
.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.focused) > .contents > .main .monaco-icon-label {
144
color: var(--vscode-editorSuggestWidget-foreground);
145
}
146
147
.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight {
148
font-weight: bold;
149
}
150
151
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main .monaco-highlighted-label .highlight {
152
color: var(--vscode-editorSuggestWidget-highlightForeground);
153
}
154
155
.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main .monaco-highlighted-label .highlight {
156
color: var(--vscode-editorSuggestWidget-focusHighlightForeground);
157
}
158
159
/** ReadMore Icon styles **/
160
161
.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .header > .codicon-close,
162
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .readMore::before {
163
color: inherit;
164
opacity: 1;
165
font-size: 14px;
166
cursor: pointer;
167
}
168
169
.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .header > .codicon-close {
170
position: absolute;
171
top: 6px;
172
right: 2px;
173
}
174
175
.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .header > .codicon-close:hover,
176
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .readMore:hover {
177
opacity: 1;
178
}
179
180
/** signature, qualifier, type/details opacity **/
181
182
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .details-label {
183
opacity: 0.7;
184
}
185
186
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left > .signature-label {
187
overflow: hidden;
188
text-overflow: ellipsis;
189
opacity: 0.6;
190
}
191
192
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left > .qualifier-label {
193
margin-left: 12px;
194
opacity: 0.4;
195
font-size: 85%;
196
line-height: initial;
197
text-overflow: ellipsis;
198
overflow: hidden;
199
align-self: center;
200
}
201
202
/** Type Info and icon next to the label in the focused completion item **/
203
204
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .details-label {
205
font-size: 85%;
206
margin-left: 1.1em;
207
overflow: hidden;
208
text-overflow: ellipsis;
209
white-space: nowrap;
210
}
211
212
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .details-label > .monaco-tokenized-source {
213
display: inline;
214
}
215
216
/** Details: if using CompletionItem#details, show on focus **/
217
218
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .details-label {
219
display: none;
220
}
221
222
.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused > .contents > .main > .right > .details-label {
223
display: inline;
224
}
225
226
/** Details: if using CompletionItemLabel#details, always show **/
227
228
.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label) > .contents > .main > .right > .details-label,
229
.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label) > .contents > .main > .right > .details-label {
230
display: inline;
231
}
232
233
/** Ellipsis on hover **/
234
235
.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row.focused:hover > .contents > .main > .right.can-expand-details > .details-label {
236
width: calc(100% - 26px);
237
}
238
239
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left {
240
flex-shrink: 1;
241
flex-grow: 1;
242
overflow: hidden;
243
}
244
245
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left > .monaco-icon-label {
246
flex-shrink: 0;
247
}
248
249
.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label) > .contents > .main > .left > .monaco-icon-label {
250
max-width: 100%;
251
}
252
253
.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label > .contents > .main > .left > .monaco-icon-label {
254
flex-shrink: 1;
255
}
256
257
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right {
258
overflow: hidden;
259
flex-shrink: 4;
260
max-width: 70%;
261
}
262
263
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .readMore {
264
display: inline-block;
265
position: absolute;
266
right: 10px;
267
width: 18px;
268
height: 18px;
269
visibility: hidden;
270
}
271
272
/** Do NOT display ReadMore when docs is side/below **/
273
274
.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row > .contents > .main > .right > .readMore {
275
display: none !important;
276
}
277
278
/** Do NOT display ReadMore when using plain CompletionItemLabel (details/documentation might not be resolved) **/
279
280
.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label > .contents > .main > .right > .readMore {
281
display: none;
282
}
283
284
/** Focused item can show ReadMore, but can't when docs is side/below **/
285
286
.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label > .contents > .main > .right > .readMore {
287
display: inline-block;
288
}
289
290
.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused:hover > .contents > .main > .right > .readMore {
291
visibility: visible;
292
}
293
294
/** Styles for each row in the list **/
295
296
.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated {
297
opacity: 0.66;
298
text-decoration: unset;
299
}
300
301
.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated > .monaco-icon-label-container > .monaco-icon-name-container {
302
text-decoration: line-through;
303
}
304
305
.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label::before {
306
height: 100%;
307
}
308
309
.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon {
310
display: block;
311
height: 16px;
312
width: 16px;
313
margin-left: 2px;
314
background-repeat: no-repeat;
315
background-size: 80%;
316
background-position: center;
317
}
318
319
.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide {
320
display: none;
321
}
322
323
.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon {
324
display: flex;
325
align-items: center;
326
margin-right: 4px;
327
}
328
329
.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon,
330
.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon::before {
331
display: none;
332
}
333
334
.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan {
335
margin: 0 0 0 0.3em;
336
border: 0.1em solid #000;
337
width: 0.7em;
338
height: 0.7em;
339
display: inline-block;
340
}
341
342
/** Styles for the docs of the completion item in focus **/
343
344
.monaco-editor .suggest-details-container {
345
z-index: 41;
346
}
347
348
.monaco-editor .suggest-details {
349
display: flex;
350
flex-direction: column;
351
cursor: default;
352
color: var(--vscode-editorSuggestWidget-foreground);
353
}
354
355
.monaco-editor .suggest-details:focus {
356
border-color: var(--vscode-focusBorder);
357
}
358
359
.monaco-editor .suggest-details a {
360
color: var(--vscode-textLink-foreground);
361
}
362
363
.monaco-editor .suggest-details a:hover {
364
color: var(--vscode-textLink-activeForeground);
365
}
366
367
.monaco-editor .suggest-details code {
368
background-color: var(--vscode-textCodeBlock-background);
369
}
370
371
.monaco-editor .suggest-details.no-docs {
372
display: none;
373
}
374
375
.monaco-editor .suggest-details > .monaco-scrollable-element {
376
flex: 1;
377
}
378
379
.monaco-editor .suggest-details > .monaco-scrollable-element > .body {
380
box-sizing: border-box;
381
height: 100%;
382
width: 100%;
383
}
384
385
.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .header > .type {
386
flex: 2;
387
overflow: hidden;
388
text-overflow: ellipsis;
389
opacity: 0.7;
390
white-space: pre;
391
margin: 0 24px 0 0;
392
padding: 4px 0 4px 5px;
393
}
394
395
.monaco-editor .suggest-details.detail-and-doc > .monaco-scrollable-element > .body > .header > .type {
396
padding-bottom: 12px;
397
}
398
399
.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .header > .type.auto-wrap {
400
white-space: normal;
401
word-break: break-all;
402
}
403
404
.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs {
405
margin: 0;
406
padding: 4px 5px;
407
white-space: pre-wrap;
408
}
409
410
.monaco-editor .suggest-details.no-type > .monaco-scrollable-element > .body > .docs {
411
margin-right: 24px;
412
overflow: hidden;
413
}
414
415
.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs {
416
padding: 0;
417
white-space: initial;
418
min-height: calc(1rem + 8px);
419
}
420
421
.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs > div,
422
.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs > span:not(:empty) {
423
padding: 4px 5px;
424
}
425
426
.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs > div > p:first-child {
427
margin-top: 0;
428
}
429
430
.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs > div > p:last-child {
431
margin-bottom: 0;
432
}
433
434
.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs .monaco-tokenized-source {
435
white-space: pre;
436
}
437
438
.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs .code {
439
white-space: pre-wrap;
440
word-wrap: break-word;
441
}
442
443
.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs .codicon {
444
vertical-align: sub;
445
}
446
447
.monaco-editor .suggest-details > .monaco-scrollable-element > .body > p:empty {
448
display: none;
449
}
450
451
.monaco-editor .suggest-details code {
452
border-radius: 3px;
453
padding: 0 0.4em;
454
}
455
456
.monaco-editor .suggest-details ul {
457
padding-left: 20px;
458
}
459
460
.monaco-editor .suggest-details ol {
461
padding-left: 20px;
462
}
463
464
.monaco-editor .suggest-details p code {
465
font-family: var(--monaco-monospace-font);
466
}
467
468