Skip to content

Commit ca22044

Browse files
DrJKLgithub-actions
andauthored
Tailwind: Move customization into CSS (#5477)
* tailwind: Migrate out of the js/ts config part 1 * tailwind: Migrate custom variant and utility * Update test expectations [skip ci] * tailwind: Use relative colors for alpha variants * fix: Use the new numbered color tokens --------- Co-authored-by: github-actions <[email protected]>
1 parent 2e64c64 commit ca22044

File tree

9 files changed

+94
-321
lines changed

9 files changed

+94
-321
lines changed
703 Bytes
Loading
633 Bytes
Loading
-493 Bytes
Loading
-239 Bytes
Loading
-323 Bytes
Loading
-629 Bytes
Loading

src/assets/css/style.css

Lines changed: 90 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
@config '../../../tailwind.config.ts';
99

10-
1110
:root {
1211
--fg-color: #000;
1312
--bg-color: #fff;
@@ -48,6 +47,91 @@
4847
}
4948
}
5049

50+
@theme {
51+
--text-xxs: 0.625rem;
52+
--text-xxs--line-height: calc(1 / 0.625);
53+
54+
/* Palette Colors */
55+
--color-charcoal-100: #171718;
56+
--color-charcoal-200: #202121;
57+
--color-charcoal-300: #262729;
58+
--color-charcoal-400: #2d2e32;
59+
--color-charcoal-500: #313235;
60+
--color-charcoal-600: #3c3d42;
61+
--color-charcoal-700: #494a50;
62+
--color-charcoal-800: #55565e;
63+
64+
--color-stone-100: #444444;
65+
--color-stone-200: #828282;
66+
--color-stone-300: #bbbbbb;
67+
68+
--color-ivory-100: #fdfbfa;
69+
--color-ivory-200: #faf9f5;
70+
--color-ivory-300: #f0eee6;
71+
72+
--color-gray-100: #f3f3f3;
73+
--color-gray-200: #e9e9e9;
74+
--color-gray-300: #e1e1e1;
75+
--color-gray-400: #d9d9d9;
76+
--color-gray-500: #c5c5c5;
77+
--color-gray-600: #b4b4b4;
78+
--color-gray-700: #a0a0a0;
79+
--color-gray-800: #8a8a8a;
80+
81+
--color-sand-100: #e1ded5;
82+
--color-sand-200: #d6cfc2;
83+
--color-sand-300: #888682;
84+
85+
--color-slate-100: #9c9eab;
86+
--color-slate-200: #9fa2bd;
87+
--color-slate-300: #5b5e7d;
88+
89+
--color-brand-yellow: #f0ff41;
90+
--color-brand-blue: #172dd7;
91+
92+
--color-blue-100: #0b8ce9;
93+
--color-blue-200: #31b9f4;
94+
--color-success-100: #00cd72;
95+
--color-success-200: #47e469;
96+
--color-warning-100: #fd9903;
97+
--color-warning-200: #fcbf64;
98+
--color-danger-100: #c02323;
99+
--color-danger-200: #d62952;
100+
101+
--color-error: #962a2a;
102+
103+
--color-blue-selection: rgb( from var(--color-blue-100) r g b / 0.3);
104+
--color-node-hover-100: rgb( from var(--color-charcoal-800) r g b/ 0.15);
105+
--color-node-hover-200: rgb(from var(--color-charcoal-800) r g b/ 0.1);
106+
--color-modal-tag: rgb(from var(--color-gray-400) r g b/ 0.4);
107+
108+
/* PrimeVue pulled colors */
109+
--color-muted: var(--p-text-muted-color);
110+
--color-highlight: var(--p-primary-color);
111+
112+
/* Special Colors (temporary) */
113+
--color-dark-elevation-1.5: rgba(from white r g b/ 0.015);
114+
--color-dark-elevation-2: rgba(from white r g b / 0.03);
115+
}
116+
117+
@custom-variant dark-theme {
118+
.dark-theme & {
119+
@slot;
120+
}
121+
}
122+
123+
@utility scrollbar-hide {
124+
scrollbar-width: none;
125+
&::-webkit-scrollbar {
126+
width: 1px;
127+
}
128+
&::-webkit-scrollbar-thumb {
129+
background-color: transparent;
130+
}
131+
}
132+
133+
/* Everthing below here to be cleaned up over time. */
134+
51135
body {
52136
width: 100vw;
53137
height: 100vh;
@@ -790,7 +874,7 @@ audio.comfy-audio.empty-audio-widget {
790874
.comfy-load-3d,
791875
.comfy-load-3d-animation,
792876
.comfy-preview-3d,
793-
.comfy-preview-3d-animation{
877+
.comfy-preview-3d-animation {
794878
display: flex;
795879
flex-direction: column;
796880
background: transparent;
@@ -803,7 +887,7 @@ audio.comfy-audio.empty-audio-widget {
803887
.comfy-load-3d-animation canvas,
804888
.comfy-preview-3d canvas,
805889
.comfy-preview-3d-animation canvas,
806-
.comfy-load-3d-viewer canvas{
890+
.comfy-load-3d-viewer canvas {
807891
display: flex;
808892
width: 100% !important;
809893
height: 100% !important;
@@ -880,7 +964,9 @@ audio.comfy-audio.empty-audio-widget {
880964

881965
.lg-node .lg-slot,
882966
.lg-node .lg-widget {
883-
transition: opacity 0.1s ease, font-size 0.1s ease;
967+
transition:
968+
opacity 0.1s ease,
969+
font-size 0.1s ease;
884970
}
885971

886972
/* Performance optimization during canvas interaction */
@@ -912,4 +998,3 @@ audio.comfy-audio.empty-audio-widget {
912998
/* Use solid colors only */
913999
background-image: none !important;
9141000
}
915-

src/renderer/extensions/vueNodes/components/LGraphNode.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,16 @@
77
:data-node-id="nodeData.id"
88
:class="
99
cn(
10-
'bg-white dark-theme:bg-charcoal-primary',
10+
'bg-white dark-theme:bg-charcoal-100',
1111
'min-w-[445px]',
1212
'lg-node absolute border border-solid rounded-2xl',
13-
'outline outline-transparent outline-2',
13+
'outline-transparent outline-2',
1414
{
1515
'outline-black dark-theme:outline-white': isSelected
1616
},
1717
{
1818
'border-blue-500 ring-2 ring-blue-300': isSelected,
19-
'border-sand-primary dark-theme:border-charcoal-tertiary':
20-
!isSelected,
19+
'border-sand-100 dark-theme:border-charcoal-300': !isSelected,
2120
'animate-pulse': executing,
2221
'opacity-50': nodeData.mode === 4,
2322
'border-red-500 bg-red-50': error,

0 commit comments

Comments
 (0)