Skip to content

Commit 8fc5464

Browse files
apply stylelint auto fixes (#5940)
## Summary Applied stylelint auto-fixes and resolved manual CSS issues across 25 files to achieve full compliance with stylelint rules. ## Changes - **What**: Auto-fixed 68 CSS issues (legacy color functions, font-weight keywords, shorthand properties, pseudo-element notation) and manually resolved 6 remaining issues (duplicate selectors, vendor prefix duplicates, font fallbacks, Vue v-bind whitelisting) - **Config**: Disabled `no-descending-specificity` rule (43 warnings require architectural CSS refactor) ## Review Focus Verify no visual regressions from modernized CSS syntax: - Modern [color function notation](https://www.w3.org/TR/css-color-4/#funcdef-rgb): `rgba(0, 0, 0, 0.5)` → `rgb(0 0 0 / 50%)` - Numeric font weights: `bold`/`normal` → `700`/`400` - Pseudo-element double colons: `:before` → `::before ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5940-apply-stylelint-auto-fixes-2846d73d365081ee8031c212a69a4bd4) by [Unito](https://www.unito.io) --------- Co-authored-by: DrJKL <[email protected]>
1 parent fe0eaae commit 8fc5464

File tree

21 files changed

+94
-105
lines changed

21 files changed

+94
-105
lines changed

.stylelintrc.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
}
88
],
99
"rules": {
10-
"import-notation": "url",
10+
"import-notation": "string",
1111
"font-family-no-missing-generic-family-keyword": true,
12-
"declaration-block-no-redundant-longhand-properties": true,
1312
"declaration-property-value-no-unknown": [
1413
true,
1514
{
1615
"ignoreProperties": {
1716
"speak": ["none"],
18-
"app-region": ["drag", "no-drag"]
17+
"app-region": ["drag", "no-drag"],
18+
"/^(width|height)$/": ["/^v-bind/"]
1919
}
2020
}
2121
],
@@ -35,7 +35,7 @@
3535
"selector-max-type": 2,
3636
"declaration-block-no-duplicate-properties": true,
3737
"block-no-empty": true,
38-
"no-descending-specificity": true,
38+
"no-descending-specificity": null,
3939
"no-duplicate-at-import-rules": true,
4040
"at-rule-no-unknown": [
4141
true,
@@ -57,7 +57,8 @@
5757
true,
5858
{
5959
"ignoreFunctions": [
60-
"theme"
60+
"theme",
61+
"v-bind"
6162
]
6263
}
6364
]

apps/desktop-ui/src/components/install/InstallLocationPicker.vue

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,12 @@ const onFocus = async () => {
286286
.p-accordionheader {
287287
@apply rounded-t-xl rounded-b-none;
288288
}
289+
290+
.p-accordionheader-toggle-icon {
291+
&::before {
292+
content: '\e902';
293+
}
294+
}
289295
}
290296
291297
.p-accordioncontent {
@@ -302,13 +308,5 @@ const onFocus = async () => {
302308
content: '\e933';
303309
}
304310
}
305-
306-
.p-accordionpanel-active {
307-
.p-accordionheader-toggle-icon {
308-
&::before {
309-
content: '\e902';
310-
}
311-
}
312-
}
313311
}
314312
</style>

apps/desktop-ui/src/views/DesktopUpdateView.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ onUnmounted(() => electron.Validation.dispose())
6565
6666
.download-bg::before {
6767
@apply m-0 absolute text-muted;
68-
font-family: 'primeicons';
68+
font-family: 'primeicons', sans-serif;
6969
top: -2rem;
7070
right: 2rem;
7171
speak: none;
7272
font-style: normal;
73-
font-weight: normal;
73+
font-weight: 400;
7474
font-variant: normal;
7575
text-transform: none;
7676
line-height: 1;

apps/desktop-ui/src/views/MaintenanceView.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,12 @@ onUnmounted(() => electron.Validation.dispose())
186186
187187
.backspan::before {
188188
@apply m-0 absolute text-muted;
189-
font-family: 'primeicons';
189+
font-family: 'primeicons', sans-serif;
190190
top: -2rem;
191191
right: -2rem;
192192
speak: none;
193193
font-style: normal;
194-
font-weight: normal;
194+
font-weight: 400;
195195
font-variant: normal;
196196
text-transform: none;
197197
line-height: 1;

apps/desktop-ui/src/views/ServerStartView.vue

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
style="
1919
background: radial-gradient(
2020
ellipse 800px 600px at center,
21-
rgba(23, 23, 23, 0.95) 0%,
22-
rgba(23, 23, 23, 0.93) 10%,
23-
rgba(23, 23, 23, 0.9) 20%,
24-
rgba(23, 23, 23, 0.85) 30%,
25-
rgba(23, 23, 23, 0.75) 40%,
26-
rgba(23, 23, 23, 0.6) 50%,
27-
rgba(23, 23, 23, 0.4) 60%,
28-
rgba(23, 23, 23, 0.2) 70%,
29-
rgba(23, 23, 23, 0.1) 80%,
30-
rgba(23, 23, 23, 0.05) 90%,
21+
rgb(23 23 23 / 0.95) 0%,
22+
rgb(23 23 23 / 0.93) 10%,
23+
rgb(23 23 23 / 0.9) 20%,
24+
rgb(23 23 23 / 0.85) 30%,
25+
rgb(23 23 23 / 0.75) 40%,
26+
rgb(23 23 23 / 0.6) 50%,
27+
rgb(23 23 23 / 0.4) 60%,
28+
rgb(23 23 23 / 0.2) 70%,
29+
rgb(23 23 23 / 0.1) 80%,
30+
rgb(23 23 23 / 0.05) 90%,
3131
transparent 100%
3232
);
3333
"

knip.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ const config: KnipConfig = {
4444
compilers: {
4545
// https://github.com/webpro-nl/knip/issues/1008#issuecomment-3207756199
4646
css: (text: string) =>
47-
[
48-
...text.replaceAll('plugin', 'import').matchAll(/(?<=@)import[^;]+/g)
49-
].join('\n')
47+
[...text.replaceAll('plugin', 'import').matchAll(/(?<=@)import[^;]+/g)]
48+
.map((match) => match[0].replace(/url\(['"]?([^'"()]+)['"]?\)/, '$1'))
49+
.join('\n')
5050
},
5151
vite: {
5252
config: ['vite?(.*).config.mts']

packages/design-system/src/css/style.css

Lines changed: 39 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,6 @@
99

1010
@config '../../tailwind.config.ts';
1111

12-
:root {
13-
--fg-color: #000;
14-
--bg-color: #fff;
15-
--comfy-menu-bg: #353535;
16-
--comfy-menu-secondary-bg: #292929;
17-
--comfy-topbar-height: 2.5rem;
18-
--comfy-input-bg: #222;
19-
--input-text: #ddd;
20-
--descrip-text: #999;
21-
--drag-text: #ccc;
22-
--error-text: #ff4444;
23-
--border-color: #4e4e4e;
24-
--tr-even-bg-color: #222;
25-
--tr-odd-bg-color: #353535;
26-
--primary-bg: #236692;
27-
--primary-fg: #ffffff;
28-
--primary-hover-bg: #3485bb;
29-
--primary-hover-fg: #ffffff;
30-
--content-bg: #e0e0e0;
31-
--content-fg: #000;
32-
--content-hover-bg: #adadad;
33-
--content-hover-fg: #000;
34-
35-
/* Code styling colors for help menu*/
36-
--code-text-color: rgba(0, 122, 255, 1);
37-
--code-bg-color: rgba(96, 165, 250, 0.2);
38-
--code-block-bg-color: rgba(60, 60, 60, 0.12);
39-
}
40-
4112
@media (prefers-color-scheme: dark) {
4213
:root {
4314
--fg-color: #fff;
@@ -129,6 +100,35 @@
129100
}
130101

131102
:root {
103+
--fg-color: #000;
104+
--bg-color: #fff;
105+
--comfy-menu-bg: #353535;
106+
--comfy-menu-secondary-bg: #292929;
107+
--comfy-topbar-height: 2.5rem;
108+
--comfy-input-bg: #222;
109+
--input-text: #ddd;
110+
--descrip-text: #999;
111+
--drag-text: #ccc;
112+
--error-text: #ff4444;
113+
--border-color: #4e4e4e;
114+
--tr-even-bg-color: #222;
115+
--tr-odd-bg-color: #353535;
116+
--primary-bg: #236692;
117+
--primary-fg: #ffffff;
118+
--primary-hover-bg: #3485bb;
119+
--primary-hover-fg: #ffffff;
120+
--content-bg: #e0e0e0;
121+
--content-fg: #000;
122+
--content-hover-bg: #adadad;
123+
--content-hover-fg: #000;
124+
125+
/* Code styling colors for help menu*/
126+
--code-text-color: rgb(0 122 255 / 1);
127+
--code-bg-color: rgb(96 165 250 / 0.2);
128+
--code-block-bg-color: rgb(60 60 60 / 0.12);
129+
130+
/* --- */
131+
132132
--backdrop: var(--color-white);
133133
--dialog-surface: var(--color-neutral-200);
134134
--node-component-border: var(--color-gray-400);
@@ -150,7 +150,9 @@
150150
--node-component-tooltip-border: var(--color-sand-100);
151151
--node-component-tooltip-surface: var(--color-white);
152152
--node-component-widget-input: var(--fg-color);
153-
--node-component-widget-input-surface: rgb(from var(--color-zinc-500) r g b / 10%);
153+
--node-component-widget-input-surface: rgb(
154+
from var(--color-zinc-500) r g b / 10%
155+
);
154156
--node-component-widget-skeleton-surface: var(--color-zinc-300);
155157
--node-stroke: var(--color-stone-100);
156158
}
@@ -496,7 +498,7 @@ body {
496498

497499
/* Strong and emphasis */
498500
.comfy-markdown-content strong {
499-
font-weight: bold;
501+
font-weight: 700;
500502
}
501503

502504
.comfy-markdown-content em {
@@ -507,7 +509,7 @@ body {
507509
display: none; /* Hidden by default */
508510
position: fixed; /* Stay in place */
509511
z-index: 100; /* Sit on top */
510-
padding: 30px 30px 10px 30px;
512+
padding: 30px 30px 10px;
511513
background-color: var(--comfy-menu-bg); /* Modal background */
512514
color: var(--error-text);
513515
box-shadow: 0 0 20px #888888;
@@ -555,8 +557,8 @@ body {
555557
background-color: var(--comfy-menu-bg);
556558
font-family: sans-serif;
557559
padding: 10px;
558-
border-radius: 0 8px 8px 8px;
559-
box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.4);
560+
border-radius: 0 8px 8px;
561+
box-shadow: 3px 3px 8px rgb(0 0 0 / 0.4);
560562
}
561563

562564
.comfy-menu-header {
@@ -574,7 +576,7 @@ body {
574576
}
575577

576578
.comfy-menu .comfy-menu-actions button {
577-
background-color: rgba(0, 0, 0, 0);
579+
background-color: rgb(0 0 0 / 0);
578580
padding: 0;
579581
border: none;
580582
cursor: pointer;
@@ -689,7 +691,7 @@ span.drag-handle::after {
689691
min-width: 160px;
690692
margin: 0;
691693
padding: 3px;
692-
font-weight: normal;
694+
font-weight: 400;
693695
}
694696

695697
.comfy-list-items button {
@@ -806,7 +808,7 @@ dialog {
806808
}
807809

808810
dialog::backdrop {
809-
background: rgba(0, 0, 0, 0.5);
811+
background: rgb(0 0 0 / 0.5);
810812
}
811813

812814
.comfy-dialog.comfyui-dialog.comfy-modal {
@@ -1012,9 +1014,6 @@ audio.comfy-audio.empty-audio-widget {
10121014
.lg-node {
10131015
/* Disable text selection on all nodes */
10141016
user-select: none;
1015-
-webkit-user-select: none;
1016-
-moz-user-select: none;
1017-
-ms-user-select: none;
10181017
}
10191018

10201019
.lg-node .lg-slot,
@@ -1041,7 +1040,6 @@ audio.comfy-audio.empty-audio-widget {
10411040
filter: none;
10421041
backdrop-filter: none;
10431042
text-shadow: none;
1044-
-webkit-mask-image: none;
10451043
mask-image: none;
10461044
clip-path: none;
10471045
background-image: none;

src/components/graph/NodeTooltip.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ useEventListener(window, 'click', hideTooltip)
136136
pointer-events: none;
137137
background: var(--comfy-input-bg);
138138
border-radius: 5px;
139-
box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
139+
box-shadow: 0 0 5px rgb(0 0 0 / 0.4);
140140
color: var(--input-text);
141141
font-family: sans-serif;
142142
left: 0;

src/components/graph/modals/ZoomControlsModal.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,10 @@ watch(
229229
</script>
230230
<style>
231231
.zoomInputContainer:focus-within {
232-
border: 1px solid rgb(204, 204, 204);
232+
border: 1px solid rgb(204 204 204);
233233
}
234234
235235
.dark-theme .zoomInputContainer:focus-within {
236-
border: 1px solid rgb(204, 204, 204);
236+
border: 1px solid rgb(204 204 204);
237237
}
238238
</style>

src/components/helpcenter/HelpCenterMenuContent.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ onMounted(async () => {
526526
overflow-y: auto;
527527
background: var(--p-content-background);
528528
border-radius: 12px;
529-
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
529+
box-shadow: 0 8px 32px rgb(0 0 0 / 0.15);
530530
border: 1px solid var(--p-content-border-color);
531531
backdrop-filter: blur(8px);
532532
position: relative;
@@ -611,7 +611,7 @@ onMounted(async () => {
611611
font-size: 0.8rem;
612612
font-weight: 600;
613613
color: var(--p-text-muted-color);
614-
margin: 0 0 0.5rem 0;
614+
margin: 0 0 0.5rem;
615615
padding: 0 1rem;
616616
text-transform: uppercase;
617617
letter-spacing: 0.5px;
@@ -669,7 +669,7 @@ onMounted(async () => {
669669
background: var(--p-content-background);
670670
border-radius: 12px;
671671
border: 1px solid var(--p-content-border-color);
672-
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
672+
box-shadow: 0 8px 32px rgb(0 0 0 / 0.15);
673673
overflow: hidden;
674674
transition: opacity 0.15s ease-out;
675675
}

0 commit comments

Comments
 (0)