fix(theme): readable on-accent text color and unified accent aliases

Solid-accent buttons used the page text color (--lora-text) or white,
which falls below WCAG AA on the mid-bright accent (L 52-72%) in every
theme/preset — e.g. ~1.7:1 in dark+solarized, making primary buttons
hard to read. Add --color-accent-contrast (dark, low-chroma, same hue,
derived per preset) aliased as --text-on-accent, and switch ~90
accent-background selectors (primary/confirm buttons, nav items, chips,
badges, checkmarks) to it.

Also define the previously dangling --lora-accent-l/c/h, --lora-accent-hover
and --lora-accent-light aliases (fixing ~40 dead declarations), replace the
hardcoded rgba(--lora-accent-rgb, 79 70 229) fallbacks with oklch channel
syntax, and add the missing margin above .template-custom-input in
settings.
This commit is contained in:
Will Miao
2026-10-10 20:41:10 +08:00
parent 3d165f92e0
commit c0165919b3
34 changed files with 129 additions and 103 deletions
@@ -330,7 +330,7 @@
.showcase-layout-toggle .layout-toggle-btn.active {
background: var(--lora-accent);
color: var(--lora-text);
color: var(--text-on-accent);
}
/* Vertical list layout (showcase_layout = vertical): every example stacked
@@ -446,7 +446,7 @@
.media-control-btn.set-preview-btn:hover {
background: var(--lora-accent);
color: white;
color: var(--text-on-accent);
border-color: var(--lora-accent);
}
@@ -805,7 +805,7 @@
.select-files-btn {
background: var(--lora-accent);
color: var(--lora-text);
color: var(--text-on-accent);
border: none;
border-radius: var(--border-radius-xs);
padding: var(--space-2) var(--space-3);
@@ -891,7 +891,7 @@
.setup-settings-btn {
margin-top: var(--space-2);
background: var(--lora-accent) !important;
color: var(--lora-text) !important;
color: var(--text-on-accent) !important;
}
.setup-settings-btn:hover {