fix(ui): connection status badge text invisible on some themes

Some Obsidian themes define --background-modifier-success/error
identically to --text-success/error, so the badge's colored chip
background exactly matched its own text color, making the label
invisible (confirmed via computed style: both resolved to the same
rgb() value). Use the same neutral --background-secondary as the
checking state for connected/disconnected too, relying only on the
state-colored text and dot for contrast.
This commit is contained in:
ClaudiaFang 2026-07-14 11:20:03 +00:00
parent c7ae0f6754
commit 12cce6497e

View file

@ -595,14 +595,18 @@
background: var(--background-secondary);
}
/* Background intentionally stays the same neutral --background-secondary as
* the checking state rather than --background-modifier-success/error: some
* themes define those modifier colors identically to --text-success/error,
* which would make the label text invisible against its own background. */
.gfs-connection-status.is-connected {
color: var(--text-success);
background: var(--background-modifier-success);
background: var(--background-secondary);
}
.gfs-connection-status.is-disconnected {
color: var(--text-error);
background: var(--background-modifier-error);
background: var(--background-secondary);
}
/* ── Global status bar connection indicator ────────────────────── */