From 4d18a421e2a7fe8e7586cc6883d5fc0abd483096 Mon Sep 17 00:00:00 2001 From: edbfi <326875205+edbfi@users.noreply.github.com> Date: Sun, 11 Oct 2026 17:51:08 +0200 Subject: [PATCH 1/2] fix(unocss): extract utilities from class: directives Without @unocss/extractor-svelte, a utility used only in a class: directive gets no CSS. Every directive utility here also appears elsewhere today, so nothing is missing yet. Signed-off-by: edbfi <326875205+edbfi@users.noreply.github.com> --- bun.lock | 3 +++ package.json | 1 + uno.config.ts | 2 ++ 3 files changed, 6 insertions(+) diff --git a/bun.lock b/bun.lock index d35a7737..e6079fbb 100644 --- a/bun.lock +++ b/bun.lock @@ -31,6 +31,7 @@ "@types/bun": "1.4.2", "@types/sanitize-html": "2.16.2", "@typescript/native": "npm:typescript@7.0.2", + "@unocss/extractor-svelte": "66.10.5", "@unocss/reset": "66.10.5", "drizzle-kit": "0.31.11", "fast-check": "4.10.2", @@ -353,6 +354,8 @@ "@unocss/extractor-arbitrary-variants": ["@unocss/extractor-arbitrary-variants@66.10.5", "", { "dependencies": { "@unocss/core": "66.10.5" } }, "sha512-8qCJjByALdNiGQB1xHWK3tAl3n+hacBLlklqHhgNj0qWYtr3Hp+pfyA2nuyzJcPXkolqtGn1APJ1TNPbL5w+qg=="], + "@unocss/extractor-svelte": ["@unocss/extractor-svelte@66.10.5", "", {}, "sha512-gFaGBK6wCR/5X3DFKOfATGSv4waTwrPrhZdTsKq8Jw6OtOGvY30ILVgk+OHcjmCdaxDfHwH7Go87AOSL9WetQg=="], + "@unocss/inspector": ["@unocss/inspector@66.10.5", "", { "dependencies": { "@unocss/config": "66.10.5", "@unocss/core": "66.10.5", "@unocss/rule-utils": "66.10.5", "devframe": "^1.0.0", "tinyglobby": "^0.2.17", "unplugin-utils": "^0.3.2" } }, "sha512-YTYkwzBrEnfleoIv9Q7PQDlbC7st/hUKI8V7veWwkqpzcAxGcLfbLn50jGgnbvAZrxtGgvF021uW6aor9FyX6A=="], "@unocss/preset-attributify": ["@unocss/preset-attributify@66.10.5", "", { "dependencies": { "@unocss/core": "66.10.5" } }, "sha512-2wgfTLGe7ryG9FwAMhNNpfzuL7jbBRWP4VgeGLnKusGIPrzmJ+bF3/+EZTgVZwAi+5jhj6wofcEJLvmHRUOYMw=="], diff --git a/package.json b/package.json index 2e3526cc..bdb86f74 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "@sveltejs/vite-plugin-svelte": "7.3.1", "@types/bun": "1.4.2", "@types/sanitize-html": "2.16.2", + "@unocss/extractor-svelte": "66.10.5", "@unocss/reset": "66.10.5", "drizzle-kit": "0.31.11", "fast-check": "4.10.2", diff --git a/uno.config.ts b/uno.config.ts index 79721d5d..4ac3d8a5 100644 --- a/uno.config.ts +++ b/uno.config.ts @@ -1,3 +1,4 @@ +import extractorSvelte from '@unocss/extractor-svelte'; import { defineConfig, presetIcons, @@ -10,6 +11,7 @@ import presetAnimations from 'unocss-preset-animations'; import { presetShadcn } from 'unocss-preset-shadcn'; export default defineConfig({ + extractors: [extractorSvelte()], // Safelist classes that are used in portalled components (AlertDialog, etc.) // These need to be safelisted because UnoCSS may not detect them when content is dynamically portalled safelist: [ From 0e2499dbe8d049db09687745ba1d9554b8ffc16c Mon Sep 17 00:00:00 2001 From: edbfi <326875205+edbfi@users.noreply.github.com> Date: Sun, 11 Oct 2026 19:03:15 +0200 Subject: [PATCH 2/2] docs: sync the SvelteKit agent rule from agent-rules (1adb50b) Brings the Wind4 UnoCSS setup (agent-rules#47) and shutdown without a front (agent-rules#46). Signed-off-by: edbfi <326875205+edbfi@users.noreply.github.com> --- .agents/rules/svelte5-sveltekit-app.md | 39 ++++++++++++++------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/.agents/rules/svelte5-sveltekit-app.md b/.agents/rules/svelte5-sveltekit-app.md index b0136338..e0556052 100644 --- a/.agents/rules/svelte5-sveltekit-app.md +++ b/.agents/rules/svelte5-sveltekit-app.md @@ -354,31 +354,33 @@ Formsnap is no longer used (`formsnap@2.0.1` peers superforms `^2.19.0`, excludi This is where agents most often produce broken setups. The rules: 1. **Use UnoCSS in global mode (`unocss/vite`), not `@unocss/svelte-scoped`.** Svelte-scoped rewrites utility class names per component and distributes styles into component `