Problem
#2502's CSS class drift audit surfaces orphans grouped into two buckets: drift clusters (attributable to a removing commit — see #2508, #2509, #2510) and unresolved (no .className rule ever existed in the ui/src/styles.css import graph, per git log -S over ui/src/styles/).
The unresolved bucket is a mix of bug classes:
- BEM sub-elements added at call sites but never defined
- Fork-side classes with no rule (may need fork-owned CSS)
- Dynamic-construction artifacts that are scope-out false positives
Each needs individual investigation — blanket "add CSS rule" or "rename to X" doesn't apply.
Unresolved orphans (9)
| Class |
Callsites |
Likely cause |
.cron-run-entry__main |
views/cron.ts:1726 |
BEM sub-element of .cron-run-entry (defined) — parent exists, child doesn't |
.cron-run-entry__title |
views/cron.ts:1727 |
same as above |
.debug-event-log |
views/debug.ts:128 |
No rule anywhere. May want fork-owned CSS or refactor to existing class. |
.form-field |
views/channels.nostr-profile-form.ts:94, :118 |
Likely fork-side, needs CSS rule or rename |
.language- |
markdown.ts:187 |
False positive. Dynamic: class="language-${escapeHtml(lang)}" for code syntax highlighting — out of audit scope. |
.monospace |
views/channels.nostr.ts:78, :210 |
Likely intended .mono (which exists) — rename candidate |
.nav-item--external |
app-render.ts:284 |
Modifier added by fork #2501 but no CSS rule — needs fork-owned rule or remove |
.nav-section--links |
app-render.ts:278 |
same as above |
.nostr-profile-form |
views/channels.nostr-profile-form.ts:167 |
Fork-side, needs CSS rule |
Scope
Per-class investigation, in whichever order makes sense. Likely outcomes:
- Add fork-owned CSS rule (e.g.,
ui/src/styles/nostr.css or extend topbar-brand.css) for classes that SHOULD exist
- Remove the class reference if it's unused by any CSS rule and has no styling effect
- Rename to an existing class when a close match exists (e.g.,
.monospace → .mono)
- Annotate and skip for audit false positives (
.language- prefix)
Acceptance criteria
References
Problem
#2502's CSS class drift audit surfaces orphans grouped into two buckets: drift clusters (attributable to a removing commit — see #2508, #2509, #2510) and unresolved (no
.classNamerule ever existed in theui/src/styles.cssimport graph, pergit log -Soverui/src/styles/).The unresolved bucket is a mix of bug classes:
Each needs individual investigation — blanket "add CSS rule" or "rename to X" doesn't apply.
Unresolved orphans (9)
.cron-run-entry__mainviews/cron.ts:1726.cron-run-entry(defined) — parent exists, child doesn't.cron-run-entry__titleviews/cron.ts:1727.debug-event-logviews/debug.ts:128.form-fieldviews/channels.nostr-profile-form.ts:94, :118.language-markdown.ts:187class="language-${escapeHtml(lang)}"for code syntax highlighting — out of audit scope..monospaceviews/channels.nostr.ts:78, :210.mono(which exists) — rename candidate.nav-item--externalapp-render.ts:284.nav-section--linksapp-render.ts:278.nostr-profile-formviews/channels.nostr-profile-form.ts:167Scope
Per-class investigation, in whichever order makes sense. Likely outcomes:
ui/src/styles/nostr.cssor extendtopbar-brand.css) for classes that SHOULD exist.monospace→.mono).language-prefix)Acceptance criteria
node scripts/audit-css-class-drift.mjs— unresolved count drops to 0 or to only documented scope-out false positivesReferences
node scripts/audit-css-class-drift.mjs