fix(theme): text on a filled colour needs its own token — the old one inverts
CI & Build / Python lint (push) Successful in 4s
CI & Build / Plugin hooks (push) Successful in 13s
CI & Build / integration (push) Successful in 29s
CI & Build / TypeScript typecheck (push) Successful in 33s
CI & Build / Python tests (push) Successful in 55s
CI & Build / Build & push image (push) Successful in 41s

76 hardcoded `color: #fff` now resolve to --fs-text-on-action, a new token
that is parchment in BOTH modes.

The design system said they should supersede to --fs-text-primary, on the
recorded reasoning that "there is no 'text on action' colour, there is just the
text colour." That is true on dark and wrong on light. --fs-text-primary
inverts to #14171A; the surfaces underneath it do not invert at all — every one
of these 76 sits on an action colour, a semantic colour, the accent, or the CTA
gradient, all of which hold a single value across modes.

Sweeping as recorded would have put obsidian text on moss green: roughly 2.4:1,
against a house style whose stated floor is WCAG AA. It would have looked
correct to me, because I checked it in the mode where it was correct.

--color-accent-fg had the same defect independently and is repointed too.

The token check now reports zero superseded literals, down from 30 files, and
raw colour literals drop 246 -> 169.

Closes #2275.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UaYUaouG9jjhATyuxCKrQs
This commit is contained in:
2026-07-31 22:40:58 -04:00
co-authored by Claude Opus 5
parent 731ca284c3
commit 4c9a637507
32 changed files with 86 additions and 87 deletions
+1 -1
View File
@@ -396,7 +396,7 @@ onMounted(loadVersions);
.btn-restore {
padding: 0.45rem 1rem;
background: var(--color-primary);
color: #fff;
color: var(--fs-text-on-action);
border: none;
border-radius: var(--radius-sm);
cursor: pointer;
@@ -192,7 +192,7 @@ const markers: Record<DiffLine["type"], string> = {
}
.iap-btn-accept {
background: var(--color-success, #22c55e);
color: #fff;
color: var(--fs-text-on-action);
}
.iap-btn-accept:hover { opacity: 0.85; }
+1 -1
View File
@@ -82,7 +82,7 @@ onUnmounted(() => {
top: -5px;
right: -5px;
background: var(--color-danger, #ef4444);
color: #fff;
color: var(--fs-text-on-action);
font-size: 0.6rem;
font-weight: 700;
min-width: 16px;
+1 -1
View File
@@ -90,7 +90,7 @@ function goToPage(page: number) {
}
.page-btn.active {
background: var(--color-primary);
color: #fff;
color: var(--fs-text-on-action);
border-color: var(--color-primary);
}
.ellipsis {
+2 -2
View File
@@ -268,7 +268,7 @@ onMounted(async () => {
.share-tab.active {
background: var(--color-primary);
border-color: var(--color-primary);
color: #fff;
color: var(--fs-text-on-action);
}
.share-target-form {
@@ -339,7 +339,7 @@ onMounted(async () => {
.btn-add-share {
padding: 0.45rem 1rem;
background: var(--gradient-cta);
color: #fff;
color: var(--fs-text-on-action);
border: none;
border-radius: 6px;
font-size: 0.85rem;
+3 -3
View File
@@ -390,7 +390,7 @@ async function confirmDelete() {
.btn-confirm {
padding: 0.35rem 0.8rem;
background: var(--color-action-primary);
color: #fff;
color: var(--fs-text-on-action);
border: none;
border-radius: var(--radius-sm);
cursor: pointer;
@@ -405,7 +405,7 @@ async function confirmDelete() {
padding: 0.35rem 0.8rem;
background: var(--color-action-secondary);
border: none;
color: #fff;
color: var(--fs-text-on-action);
border-radius: var(--radius-sm);
cursor: pointer;
font-size: 0.82rem;
@@ -555,6 +555,6 @@ async function confirmDelete() {
font-family: inherit;
}
.modal-btn:hover { background: var(--color-bg); }
.modal-btn-danger { background: var(--color-action-destructive); border-color: var(--color-action-destructive); color: #fff; }
.modal-btn-danger { background: var(--color-action-destructive); border-color: var(--color-action-destructive); color: var(--fs-text-on-action); }
.modal-btn-danger:hover { background: var(--color-action-destructive-hover); border-color: var(--color-action-destructive-hover); }
</style>
+2 -2
View File
@@ -217,7 +217,7 @@ onMounted(loadLogs);
.log-duration-badge {
background: var(--color-primary);
color: #fff;
color: var(--fs-text-on-action);
border-radius: 99px;
padding: 0.1rem 0.5rem;
font-size: 0.72rem;
@@ -312,7 +312,7 @@ onMounted(loadLogs);
margin-left: auto;
padding: 0.3rem 0.75rem;
background: var(--color-primary);
color: #fff;
color: var(--fs-text-on-action);
border: none;
border-radius: var(--radius-sm);
cursor: pointer;
@@ -36,7 +36,7 @@ const toastStore = useToastStore();
gap: 0.5rem;
padding: 0.75rem 1rem;
border-radius: 6px;
color: #fff;
color: var(--fs-text-on-action);
font-size: 0.9rem;
box-shadow: 0 2px 8px var(--color-shadow);
min-width: 200px;
@@ -54,7 +54,7 @@ const toastStore = useToastStore();
padding: 0 0.15rem;
}
.toast-close:hover {
color: #fff;
color: var(--fs-text-on-action);
}
.toast--success {
background: var(--color-toast-success);
@@ -241,7 +241,7 @@ function restore() {
border-radius: var(--radius-sm);
padding: 0.25rem 0.6rem;
font-size: 0.78rem;
color: #fff;
color: var(--fs-text-on-action);
cursor: pointer;
font-family: inherit;
}
@@ -643,7 +643,7 @@ defineExpose({ reload: loadProjectNotes });
border-radius: 3px;
transition: background 0.15s, color 0.15s;
}
.btn-confirm-delete:hover:not(:disabled) { background: var(--color-action-destructive); color: #fff; }
.btn-confirm-delete:hover:not(:disabled) { background: var(--color-action-destructive); color: var(--fs-text-on-action); }
.btn-confirm-delete:disabled { opacity: 0.5; cursor: default; }
.btn-cancel-delete {
@@ -671,7 +671,7 @@ defineExpose({ reload: loadProjectNotes });
.btn-confirm {
background: var(--color-primary);
color: #fff;
color: var(--fs-text-on-action);
border: none;
border-radius: 4px;
padding: 0.15rem 0.35rem;
@@ -733,7 +733,7 @@ defineExpose({ reload: loadProjectNotes });
/* Moss action-primary per Hybrid */
.btn-save {
background: var(--color-action-primary);
color: #fff;
color: var(--fs-text-on-action);
border: none;
border-radius: 5px;
padding: 0.25rem 0.7rem;
@@ -398,7 +398,7 @@ defineExpose({ reload: loadAll });
.btn-add {
background: var(--color-primary);
color: #fff;
color: var(--fs-text-on-action);
border: none;
border-radius: 5px;
padding: 0.28rem 0.55rem;
@@ -590,7 +590,7 @@ defineExpose({ reload: loadAll });
margin-left: 0.25rem;
transition: background 0.15s, color 0.15s;
}
.btn-delete-confirm:hover:not(:disabled) { background: var(--color-action-destructive); color: #fff; }
.btn-delete-confirm:hover:not(:disabled) { background: var(--color-action-destructive); color: var(--fs-text-on-action); }
.btn-delete-confirm:disabled { opacity: 0.5; cursor: default; }
.btn-delete-cancel {