diff --git a/.stylelintrc.json b/.stylelintrc.json
index edece5d9a..71a1311ae 100644
--- a/.stylelintrc.json
+++ b/.stylelintrc.json
@@ -59,7 +59,7 @@
"function-no-unknown": [
true,
{
- "ignoreFunctions": ["theme", "v-bind"]
+ "ignoreFunctions": ["theme", "v-bind", "from-folder", "from-json"]
}
]
},
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 406b4ad3f..daa8808c8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -201,7 +201,7 @@ The project supports three types of icons, all with automatic imports (no manual
2. **Iconify Icons** - 200,000+ icons from various libraries: ``, ``
3. **Custom Icons** - Your own SVG icons: ``
-Icons are powered by the unplugin-icons system, which automatically discovers and imports icons as Vue components. Custom icons are stored in `packages/design-system/src/icons/` and processed by `packages/design-system/src/iconCollection.ts` with automatic validation.
+Icons are powered by the unplugin-icons system, which automatically discovers and imports icons as Vue components. Tailwind CSS icon classes (`icon-[comfy--template]`) are provided by `@iconify/tailwind4`, configured in `packages/design-system/src/css/style.css`. Custom icons are stored in `packages/design-system/src/icons/` and loaded via `from-folder` at build time.
For detailed instructions and code examples, see [packages/design-system/src/icons/README.md](packages/design-system/src/icons/README.md).
diff --git a/components.json b/components.json
index 5127811f3..a70765222 100644
--- a/components.json
+++ b/components.json
@@ -3,7 +3,6 @@
"style": "new-york",
"typescript": true,
"tailwind": {
- "config": "tailwind.config.ts",
"css": "src/assets/css/style.css",
"baseColor": "stone",
"cssVariables": true,
diff --git a/knip.config.ts b/knip.config.ts
index d6a4a7517..e000e1882 100644
--- a/knip.config.ts
+++ b/knip.config.ts
@@ -20,10 +20,6 @@ const config: KnipConfig = {
'packages/tailwind-utils': {
project: ['src/**/*.{js,ts}']
},
- 'packages/design-system': {
- entry: ['src/**/*.ts'],
- project: ['src/**/*.{js,ts}', '*.{js,ts,mts}']
- },
'packages/registry-types': {
project: ['src/**/*.{js,ts}']
}
@@ -31,6 +27,7 @@ const config: KnipConfig = {
ignoreBinaries: ['python3', 'gh'],
ignoreDependencies: [
// Weird importmap things
+ '@iconify-json/lucide',
'@iconify/json',
'@primeuix/forms',
'@primeuix/styled',
diff --git a/packages/design-system/package.json b/packages/design-system/package.json
index d20ef86ab..90fd14609 100644
--- a/packages/design-system/package.json
+++ b/packages/design-system/package.json
@@ -4,7 +4,6 @@
"description": "Shared design system for ComfyUI Frontend",
"type": "module",
"exports": {
- "./tailwind-config": "./tailwind.config.ts",
"./css/*": "./src/css/*"
},
"scripts": {
@@ -12,7 +11,7 @@
},
"dependencies": {
"@iconify-json/lucide": "catalog:",
- "@iconify/tailwind": "catalog:"
+ "@iconify/tailwind4": "catalog:"
},
"devDependencies": {
"tailwindcss": "catalog:",
diff --git a/packages/design-system/src/css/style.css b/packages/design-system/src/css/style.css
index 6fefc8cd6..88487f0a1 100644
--- a/packages/design-system/src/css/style.css
+++ b/packages/design-system/src/css/style.css
@@ -7,11 +7,16 @@
@plugin 'tailwindcss-primeui';
-@config '../../tailwind.config.ts';
+@plugin "@iconify/tailwind4" {
+ scale: 1.2;
+ icon-sets: from-folder(comfy, './packages/design-system/src/icons');
+}
@custom-variant touch (@media (hover: none));
@theme {
+ --shadow-interface: var(--interface-panel-box-shadow);
+
--text-xxs: 0.625rem;
--text-xxs--line-height: calc(1 / 0.625);
diff --git a/packages/design-system/src/iconCollection.ts b/packages/design-system/src/iconCollection.ts
deleted file mode 100644
index 170a5465f..000000000
--- a/packages/design-system/src/iconCollection.ts
+++ /dev/null
@@ -1,100 +0,0 @@
-import { existsSync, readFileSync, readdirSync } from 'fs'
-import { join } from 'path'
-import { dirname } from 'path'
-import { fileURLToPath } from 'url'
-
-const fileName = fileURLToPath(import.meta.url)
-const dirName = dirname(fileName)
-const customIconsPath = join(dirName, 'icons')
-
-// Iconify collection structure
-interface IconifyIcon {
- body: string
- width?: number
- height?: number
-}
-
-interface IconifyCollection {
- prefix: string
- icons: Record
- width?: number
- height?: number
-}
-
-// Create an Iconify collection for custom icons
-export const iconCollection: IconifyCollection = {
- prefix: 'comfy',
- icons: {},
- width: 16,
- height: 16
-}
-
-/**
- * Validates that an SVG file contains valid SVG content
- */
-function validateSvgContent(content: string, filename: string): void {
- if (!content.trim()) {
- throw new Error(`Empty SVG file: ${filename}`)
- }
-
- if (!content.includes('