style.css 11.4 KB
Newer Older
1
2
@import url("scripts/ui/menu/menu.css");

pythongosssss's avatar
pythongosssss committed
3
4
5
:root {
	--fg-color: #000;
	--bg-color: #fff;
EllangoK's avatar
EllangoK committed
6
7
8
9
10
11
12
	--comfy-menu-bg: #353535;
	--comfy-input-bg: #222;
	--input-text: #ddd;
	--descrip-text: #999;
	--drag-text: #ccc;
	--error-text: #ff4444;
	--border-color: #4e4e4e;
reaper47's avatar
reaper47 committed
13
14
	--tr-even-bg-color: #222;
	--tr-odd-bg-color: #353535;
15
16
17
18
19
20
21
22
	--primary-bg: #236692;
	--primary-fg: #ffffff;
	--primary-hover-bg: #3485bb;
	--primary-hover-fg: #ffffff;
	--content-bg: #e0e0e0;
	--content-fg: #000;
	--content-hover-bg: #adadad;
	--content-hover-fg: #000;
pythongosssss's avatar
pythongosssss committed
23
24
25
26
27
28
}

@media (prefers-color-scheme: dark) {
	:root {
		--fg-color: #fff;
		--bg-color: #202020;
29
30
31
32
		--content-bg: #4e4e4e;
		--content-fg: #fff;
		--content-hover-bg: #222;
		--content-hover-fg: #fff;
pythongosssss's avatar
pythongosssss committed
33
34
35
	}
}

pythongosssss's avatar
pythongosssss committed
36
37
38
39
40
body {
	width: 100vw;
	height: 100vh;
	margin: 0;
	overflow: hidden;
pythongosssss's avatar
pythongosssss committed
41
42
	background-color: var(--bg-color);
	color: var(--fg-color);
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
	grid-template-columns: auto 1fr auto;
	grid-template-rows: auto auto 1fr auto;
	min-height: -webkit-fill-available;
	max-height: -webkit-fill-available;
	min-width: -webkit-fill-available;
	max-width: -webkit-fill-available;
}

.comfyui-body-top {
	order: 0;
	grid-column: 1/-1;
	z-index: 10;
}

.comfyui-body-left {
	order: 1;
	z-index: 10;
pythongosssss's avatar
pythongosssss committed
60
61
62
63
64
}

#graph-canvas {
	width: 100%;
	height: 100%;
65
66
67
68
69
70
71
72
73
74
75
76
77
	order: 2;
	grid-column: 1/-1;
}

.comfyui-body-right {
	order: 3;
	z-index: 10;
}

.comfyui-body-bottom {
	order: 4;
	grid-column: 1/-1;
	z-index: 10;
pythongosssss's avatar
pythongosssss committed
78
79
80
}

.comfy-multiline-input {
81
82
	background-color: var(--comfy-input-bg);
	color: var(--input-text);
pythongosssss's avatar
pythongosssss committed
83
84
85
86
87
	overflow: hidden;
	overflow-y: auto;
	padding: 2px;
	resize: none;
	border: none;
88
89
	box-sizing: border-box;
	font-size: 10px;
pythongosssss's avatar
pythongosssss committed
90
91
92
93
94
95
96
}

.comfy-modal {
	display: none; /* Hidden by default */
	position: fixed; /* Stay in place */
	z-index: 100; /* Sit on top */
	padding: 30px 30px 10px 30px;
EllangoK's avatar
EllangoK committed
97
98
	background-color: var(--comfy-menu-bg); /* Modal background */
	color: var(--error-text);
reaper47's avatar
reaper47 committed
99
	box-shadow: 0 0 20px #888888;
pythongosssss's avatar
pythongosssss committed
100
101
102
103
104
105
106
	border-radius: 10px;
	top: 50%;
	left: 50%;
	max-width: 80vw;
	max-height: 80vh;
	transform: translate(-50%, -50%);
	overflow: hidden;
pythongosssss's avatar
pythongosssss committed
107
	justify-content: center;
108
109
	font-family: monospace;
	font-size: 15px;
pythongosssss's avatar
pythongosssss committed
110
111
112
113
114
115
116
117
118
119
120
121
122
}

.comfy-modal-content {
	display: flex;
	flex-direction: column;
}

.comfy-modal p {
	overflow: auto;
	white-space: pre-line; /* This will respect line breaks */
	margin-bottom: 20px; /* Add some margin between the text and the close button*/
}

Jairo Correa's avatar
Jairo Correa committed
123
124
125
126
127
128
.comfy-modal select,
.comfy-modal input[type=button],
.comfy-modal input[type=checkbox] {
	margin: 3px 3px 3px 4px;
}

pythongosssss's avatar
pythongosssss committed
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
.comfy-menu-hamburger {
	position: fixed;
	top: 10px;
	z-index: 9999;
	right: 10px;
	width: 30px;
	display: none;
	gap: 8px;
	flex-direction: column;
	cursor: pointer;
}
.comfy-menu-hamburger div {
	height: 3px;
	width: 100%;
	border-radius: 20px;
	background-color: white;
}

pythongosssss's avatar
pythongosssss committed
147
148
149
150
.comfy-menu {
	font-size: 15px;
	position: absolute;
	top: 50%;
reaper47's avatar
reaper47 committed
151
	right: 0;
pythongosssss's avatar
pythongosssss committed
152
	text-align: center;
153
	z-index: 999;
pythongosssss's avatar
pythongosssss committed
154
155
156
157
	width: 170px;
	display: flex;
	flex-direction: column;
	align-items: center;
EllangoK's avatar
EllangoK committed
158
159
	color: var(--descrip-text);
	background-color: var(--comfy-menu-bg);
City's avatar
City committed
160
161
162
163
	font-family: sans-serif;
	padding: 10px;
	border-radius: 0 8px 8px 8px;
	box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.4);
pythongosssss's avatar
pythongosssss committed
164
165
}

pythongosssss's avatar
pythongosssss committed
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
.comfy-menu-header {
	display: flex;
}

.comfy-menu-actions {
	display: flex;
	gap: 3px;
	align-items: center;
	height: 20px;
	position: relative;
	top: -1px;
	font-size: 22px;
}

.comfy-menu .comfy-menu-actions button {
	background-color: rgba(0, 0, 0, 0);
	padding: 0;
	border: none;
	cursor: pointer;
	font-size: inherit;
}

.comfy-menu .comfy-menu-actions .comfy-settings-btn {
	font-size: 0.6em;
}

button.comfy-close-menu-btn {
	font-size: 1em;
	line-height: 12px;
	color: #ccc;
	position: relative;
	top: -1px;
}

.comfy-menu-queue-size {
	flex: auto;
}

204
205
.comfy-menu button,
.comfy-modal button {
pythongosssss's avatar
pythongosssss committed
206
207
208
	font-size: 20px;
}

pythongosssss's avatar
pythongosssss committed
209
210
.comfy-menu-btns {
	margin-bottom: 10px;
pythongosssss's avatar
pythongosssss committed
211
	width: 100%;
pythongosssss's avatar
pythongosssss committed
212
213
}

pythongosssss's avatar
pythongosssss committed
214
.comfy-menu-btns button {
pythongosssss's avatar
pythongosssss committed
215
216
	font-size: 10px;
	width: 50%;
EllangoK's avatar
EllangoK committed
217
	color: var(--descrip-text) !important;
City's avatar
City committed
218
219
220
221
222
223
}

.comfy-menu > button {
	width: 100%;
}

224
.comfy-btn,
City's avatar
City committed
225
226
.comfy-menu > button,
.comfy-menu-btns button,
227
.comfy-menu .comfy-list button,
pythongosssss's avatar
pythongosssss committed
228
.comfy-modal button {
EllangoK's avatar
EllangoK committed
229
230
	color: var(--input-text);
	background-color: var(--comfy-input-bg);
City's avatar
City committed
231
	border-radius: 8px;
EllangoK's avatar
EllangoK committed
232
	border-color: var(--border-color);
City's avatar
City committed
233
234
	border-style: solid;
	margin-top: 2px;
pythongosssss's avatar
pythongosssss committed
235
236
}

237
.comfy-btn:hover:not(:disabled),
pythongosssss's avatar
pythongosssss committed
238
239
240
241
.comfy-menu > button:hover,
.comfy-menu-btns button:hover,
.comfy-menu .comfy-list button:hover,
.comfy-modal button:hover,
pythongosssss's avatar
pythongosssss committed
242
.comfy-menu-actions button:hover {
pythongosssss's avatar
pythongosssss committed
243
	filter: brightness(1.2);
244
	will-change: transform;
pythongosssss's avatar
pythongosssss committed
245
246
247
	cursor: pointer;
}

pythongosssss's avatar
pythongosssss committed
248
span.drag-handle {
Jairo Correa's avatar
Jairo Correa committed
249
250
251
252
253
254
255
256
257
258
259
260
261
	width: 10px;
	height: 20px;
	display: inline-block;
	overflow: hidden;
	line-height: 5px;
	padding: 3px 4px;
	cursor: move;
	vertical-align: middle;
	margin-top: -.4em;
	margin-left: -.2em;
	font-size: 12px;
	font-family: sans-serif;
	letter-spacing: 2px;
EllangoK's avatar
EllangoK committed
262
	color: var(--drag-text);
Jairo Correa's avatar
Jairo Correa committed
263
264
265
	text-shadow: 1px 0 1px black;
}

pythongosssss's avatar
pythongosssss committed
266
span.drag-handle::after {
Jairo Correa's avatar
Jairo Correa committed
267
268
269
	content: '.. .. ..';
}

pythongosssss's avatar
pythongosssss committed
270
271
.comfy-queue-btn {
	width: 100%;
pythongosssss's avatar
pythongosssss committed
272
273
}

pythongosssss's avatar
pythongosssss committed
274
.comfy-list {
EllangoK's avatar
EllangoK committed
275
	color: var(--descrip-text);
276
	background-color: var(--comfy-menu-bg);
pythongosssss's avatar
pythongosssss committed
277
	margin-bottom: 10px;
278
	border-color: var(--border-color);
City's avatar
City committed
279
	border-style: solid;
pythongosssss's avatar
pythongosssss committed
280
281
282
283
284
}

.comfy-list-items {
	overflow-y: scroll;
	max-height: 100px;
City's avatar
City committed
285
	min-height: 25px;
EllangoK's avatar
EllangoK committed
286
	background-color: var(--comfy-input-bg);
pythongosssss's avatar
pythongosssss committed
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
	padding: 5px;
}

.comfy-list h4 {
	min-width: 160px;
	margin: 0;
	padding: 3px;
	font-weight: normal;
}

.comfy-list-items button {
	font-size: 10px;
}

.comfy-list-actions {
	margin: 5px;
	display: flex;
	gap: 5px;
	justify-content: center;
}

.comfy-list-actions button {
	font-size: 12px;
pythongosssss's avatar
pythongosssss committed
310
311
}

City's avatar
City committed
312
313
314
315
button.comfy-queue-btn {
	margin: 6px 0 !important;
}

reaper47's avatar
reaper47 committed
316
.comfy-modal.comfy-settings,
pythongosssss's avatar
pythongosssss committed
317
.comfy-modal.comfy-manage-templates {
318
319
	text-align: center;
	font-family: sans-serif;
EllangoK's avatar
EllangoK committed
320
	color: var(--descrip-text);
pythongosssss's avatar
pythongosssss committed
321
	z-index: 99;
pythongosssss's avatar
pythongosssss committed
322
323
}

missionfloyd's avatar
missionfloyd committed
324
325
326
327
328
329
330
331
.comfy-modal.comfy-settings input[type="range"] {
	vertical-align: middle;
}

.comfy-modal.comfy-settings input[type="range"] + input[type="number"] {
	width: 3.5em;
}

332
333
.comfy-modal input,
.comfy-modal select {
EllangoK's avatar
EllangoK committed
334
335
	color: var(--input-text);
	background-color: var(--comfy-input-bg);
336
	border-radius: 8px;
EllangoK's avatar
EllangoK committed
337
	border-color: var(--border-color);
338
339
340
341
	border-style: solid;
	font-size: inherit;
}

reaper47's avatar
reaper47 committed
342
343
344
345
346
.comfy-tooltip-indicator {
	text-decoration: underline;
	text-decoration-style: dashed;
}

pythongosssss's avatar
pythongosssss committed
347
@media only screen and (max-height: 850px) {
pythongosssss's avatar
pythongosssss committed
348
	.comfy-menu {
349
350
351
352
		top: 0 !important;
		bottom: 0 !important;
		left: auto !important;
		right: 0 !important;
reaper47's avatar
reaper47 committed
353
		border-radius: 0;
354
	}
reaper47's avatar
reaper47 committed
355

356
	.comfy-menu span.drag-handle {
pythongosssss's avatar
pythongosssss committed
357
358
359
360
361
362
363
364
365
366
367
368
369
		display: none;
	}
	
	.comfy-menu-queue-size {
		flex: unset;
	}

	.comfy-menu-header {
		justify-content: space-between;
	}
	.comfy-menu-actions {
		gap: 10px;
		font-size: 28px;
pythongosssss's avatar
pythongosssss committed
370
371
	}
}
missionfloyd's avatar
missionfloyd committed
372

EllangoK's avatar
EllangoK committed
373
374
/* Input popup */

missionfloyd's avatar
missionfloyd committed
375
.graphdialog {
376
	min-height: 1em;
EllangoK's avatar
EllangoK committed
377
	background-color: var(--comfy-menu-bg);
missionfloyd's avatar
missionfloyd committed
378
379
380
}

.graphdialog .name {
381
382
	font-size: 14px;
	font-family: sans-serif;
EllangoK's avatar
EllangoK committed
383
	color: var(--descrip-text);
missionfloyd's avatar
missionfloyd committed
384
385
386
}

.graphdialog button {
387
388
389
390
	margin-top: unset;
	vertical-align: unset;
	height: 1.6em;
	padding-right: 8px;
missionfloyd's avatar
missionfloyd committed
391
392
393
}

.graphdialog input, .graphdialog textarea, .graphdialog select {
EllangoK's avatar
EllangoK committed
394
	background-color: var(--comfy-input-bg);
395
	border: 2px solid;
EllangoK's avatar
EllangoK committed
396
397
	border-color: var(--border-color);
	color: var(--input-text);
398
	border-radius: 12px 0 0 12px;
missionfloyd's avatar
missionfloyd committed
399
}
400

reaper47's avatar
reaper47 committed
401
402
403
404
405
406
407
408
409
410
/* Dialogs */

dialog {
	box-shadow: 0 0 20px #888888;
}

dialog::backdrop {
	background: rgba(0, 0, 0, 0.5);
}

411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
.comfy-dialog.comfyui-dialog {
	top: 0;
}

.comfy-dialog.comfy-modal {
	font-family: Arial, sans-serif;
	border-color: var(--bg-color);
	box-shadow: none;
  	border: 2px solid var(--border-color);
}

.comfy-dialog .comfy-modal-content {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 10px;
	color: var(--fg-color);
}

.comfy-dialog .comfy-modal-content h3 {
	margin-top: 0;
}

.comfy-dialog .comfy-modal-content > p {
	width: 100%;
}

.comfy-dialog .comfy-modal-content > .comfyui-button {
	flex: 1;
	justify-content: center;
}

reaper47's avatar
reaper47 committed
442
443
444
445
446
447
448
449
450
#comfy-settings-dialog {
	padding: 0;
	width: 41rem;
}

#comfy-settings-dialog tr > td:first-child {
	text-align: right;
}

pythongosssss's avatar
pythongosssss committed
451
#comfy-settings-dialog tbody button, #comfy-settings-dialog table > button {
reaper47's avatar
reaper47 committed
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
	background-color: var(--bg-color);
	border: 1px var(--border-color) solid;
	border-radius: 0;
	color: var(--input-text);
	font-size: 1rem;
	padding: 0.5rem;
}

#comfy-settings-dialog button:hover {
	background-color: var(--tr-odd-bg-color);
}

/* General CSS for tables */

.comfy-table {
	border-collapse: collapse;
	color: var(--input-text);
	font-family: Arial, sans-serif;
	width: 100%;
}

.comfy-table caption {
pythongosssss's avatar
pythongosssss committed
474
475
	position: sticky;
	top: 0;
reaper47's avatar
reaper47 committed
476
477
478
479
480
481
	background-color: var(--bg-color);
	color: var(--input-text);
	font-size: 1rem;
	font-weight: bold;
	padding: 8px;
	text-align: center;
pythongosssss's avatar
pythongosssss committed
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
	border-bottom: 1px solid var(--border-color);
}

.comfy-table caption .comfy-btn {
	position: absolute;
	top: -2px;
	right: 0;
	bottom: 0;
	cursor: pointer;
	border: none;
	height: 100%;
	border-radius: 0;
	aspect-ratio: 1/1;
	user-select: none;
	font-size: 20px;
}

.comfy-table caption .comfy-btn:focus {
	outline: none;
reaper47's avatar
reaper47 committed
501
502
503
504
505
506
507
508
509
510
}

.comfy-table tr:nth-child(even) {
	background-color: var(--tr-even-bg-color);
}

.comfy-table tr:nth-child(odd) {
	background-color: var(--tr-odd-bg-color);
}

reaper47's avatar
reaper47 committed
511
512
.comfy-table td,
.comfy-table th {
reaper47's avatar
reaper47 committed
513
514
515
516
	border: 1px solid var(--border-color);
	padding: 8px;
}

EllangoK's avatar
EllangoK committed
517
518
/* Context menu */

space-nuko's avatar
space-nuko committed
519
.litegraph .dialog {
reaper47's avatar
reaper47 committed
520
521
	z-index: 1;
	font-family: Arial, sans-serif;
space-nuko's avatar
space-nuko committed
522
523
}

524
525
526
.litegraph .litemenu-entry.has_submenu {
	position: relative;
	padding-right: 20px;
EllangoK's avatar
EllangoK committed
527
}
pythongosssss's avatar
style  
pythongosssss committed
528

EllangoK's avatar
EllangoK committed
529
.litemenu-entry.has_submenu::after {
530
531
532
533
	content: ">";
	position: absolute;
	top: 0;
	right: 2px;
EllangoK's avatar
EllangoK committed
534
535
}

EllangoK's avatar
EllangoK committed
536
537
.litegraph.litecontextmenu,
.litegraph.litecontextmenu.dark {
pythongosssss's avatar
pythongosssss committed
538
	z-index: 9999 !important;
EllangoK's avatar
EllangoK committed
539
540
	background-color: var(--comfy-menu-bg) !important;
	filter: brightness(95%);
541
	will-change: transform;
EllangoK's avatar
EllangoK committed
542
543
544
545
546
}

.litegraph.litecontextmenu .litemenu-entry:hover:not(.disabled):not(.separator) {
	background-color: var(--comfy-menu-bg) !important;
	filter: brightness(155%);
547
	will-change: transform;
EllangoK's avatar
EllangoK committed
548
	color: var(--input-text);
EllangoK's avatar
EllangoK committed
549
550
}

EllangoK's avatar
EllangoK committed
551
552
.litegraph.litecontextmenu .litemenu-entry.submenu,
.litegraph.litecontextmenu.dark .litemenu-entry.submenu {
EllangoK's avatar
EllangoK committed
553
	background-color: var(--comfy-menu-bg) !important;
EllangoK's avatar
EllangoK committed
554
555
556
557
558
	color: var(--input-text);
}

.litegraph.litecontextmenu input {
	background-color: var(--comfy-input-bg) !important;
EllangoK's avatar
EllangoK committed
559
560
	color: var(--input-text) !important;
}
EllangoK's avatar
EllangoK committed
561

reaper47's avatar
reaper47 committed
562
563
564
565
566
567
568
.comfy-context-menu-filter {
	box-sizing: border-box;
	border: 1px solid #999;
	margin: 0 0 5px 5px;
	width: calc(100% - 10px);
}

569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
.comfy-img-preview {
	pointer-events: none;
	overflow: hidden;
	display: flex;
	flex-wrap: wrap;
 	align-content: flex-start;
	justify-content: center;
}

.comfy-img-preview img {
	object-fit: contain;
	width: var(--comfy-img-preview-width);
	height: var(--comfy-img-preview-height);
}

584
585
586
587
588
.comfy-missing-nodes li button {
	font-size: 12px;
	margin-left: 5px;
}

EllangoK's avatar
EllangoK committed
589
590
591
592
593
594
/* Search box */

.litegraph.litesearchbox {
	z-index: 9999 !important;
	background-color: var(--comfy-menu-bg) !important;
	overflow: hidden;
comfyanonymous's avatar
comfyanonymous committed
595
	display: block;
EllangoK's avatar
EllangoK committed
596
597
598
599
600
601
602
603
604
605
606
607
}

.litegraph.litesearchbox input,
.litegraph.litesearchbox select {
	background-color: var(--comfy-input-bg) !important;
	color: var(--input-text);
}

.litegraph.lite-search-item {
	color: var(--input-text);
	background-color: var(--comfy-input-bg);
	filter: brightness(80%);
608
	will-change: transform;
EllangoK's avatar
EllangoK committed
609
610
611
612
613
614
	padding-left: 0.2em;
}

.litegraph.lite-search-item.generic_type {
	color: var(--input-text);
	filter: brightness(50%);
615
	will-change: transform;
EllangoK's avatar
EllangoK committed
616
}
pythongosssss's avatar
pythongosssss committed
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633

@media only screen and (max-width: 450px) {
	#comfy-settings-dialog .comfy-table tbody {
		display: grid;
	}
	#comfy-settings-dialog .comfy-table tr {
		display: grid;
	}
	#comfy-settings-dialog tr > td:first-child {
		text-align: center;
		border-bottom: none;
		padding-bottom: 0;
	}
	#comfy-settings-dialog tr > td:not(:first-child) {
		text-align: center;
		border-top: none;
	}
634
}
Chenlei Hu's avatar
Chenlei Hu committed
635
636
637
638

audio.comfy-audio.empty-audio-widget {
	display: none;
}