Repository navigation
fix(unocss): extract utilities from class: directives - #247
Conversation
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>
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>
There was a problem hiding this comment.
ℹ️ No critical issues found; nothing blocking.
Reviewed changes
Reviewed the full diff of the two commits (4 files).
uno.config.ts— addsextractors: [extractorSvelte()]. UnoCSS keeps its default extractor alongside custom ones, so this only addsclass:directive extraction. The safelist and the./src/**/*.{html,js,svelte,ts}pipeline are untouched.package.json/bun.lock— adds@unocss/extractor-sveltepinned to66.10.5, matching the other@unocss/*pins. The lock workspace block mirrorspackage.json..agents/rules/svelte5-sveltekit-app.md— managed rule copy synced from agent-rules@1adb50b (Wind4 setup, shutdown without a front). Not reviewed for content, per repo convention.
Not verified: I couldn't install dependencies or run bun run build in this sandbox, so the built-CSS before/after comparison rests on the PR description. The lock entry's integrity hash and empty dependency map also can't be checked offline.
Nitpick: @unocss/reset (package.json:41) has no import anywhere in the repo. It isn't introduced by this PR, so no change is needed here.
claude-sonnet-5-5 | 𝕏
|
Review nitpick (unused |

Adds
@unocss/extractor-svelte. Without it, a utility used only in aclass:directive gets no CSS. Today each of obzorarr's 55 directive utilities also appears somewhere else, so nothing is missing yet; this keeps it that way.Changes
@unocss/extractor-svelte(66.10.5, dev) andextractors: [extractorSvelte()]..agents/rules/svelte5-sveltekit-app.mdis synced from agent-rules@1adb50b. It brings the Wind4 UnoCSS setup (agent-rules#47) and shutdown without a front (agent-rules#46).src/lib/server/slides/sanitize.ts:54allowsclasson every tag of custom-slide HTML, so stored slides may rely on safelisted utilities.Evidence
bun run buildonorigin/mainand on this branch, then a set-diff of every rule in the client CSS.:root,:hosttheme variables are reordered; no rule or value changes.class:<token>directive insrc/and checked that the built CSS has a rule for it. Before and after, every utility has a rule. The only tokens without one aresavingandvariant-dark, which are component classes, not utilities.bun run check: 0 errors and 0 warnings.classon user HTML.Not in this PR
transform_index_html_unsupportedwarning stays (edbfi-ci D24). SvelteKit never calls UnoCSS'stransformIndexHtmlhook, andapp.htmlhas no utilities, so nothing is lost.uno.css. This was measured in all five apps, and moving the import to the root layout didn't fix it. It's recorded in edbfi-ci as a separate investigation.Owner actions
None.