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
+7 -7
View File
@@ -42,7 +42,7 @@
padding: 0 0.4rem;
border-radius: 999px;
background: var(--lora-accent);
color: #fff;
color: var(--text-on-accent);
font-size: 0.75rem;
font-weight: 600;
align-items: center;
@@ -163,7 +163,7 @@
.update-link:hover {
background: var(--lora-accent);
color: white;
color: var(--text-on-accent);
transform: translateY(-2px);
}
@@ -274,7 +274,7 @@
.changelog-item .latest-badge {
background-color: var(--lora-accent);
color: white;
color: var(--text-on-accent);
padding: 2px 8px;
border-radius: 12px;
font-size: 0.75em;
@@ -384,12 +384,12 @@
.channel-btn.active {
background: var(--lora-accent, #4285F4);
color: #fff;
color: var(--text-on-accent);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.channel-btn.active i {
color: #fff;
color: var(--text-on-accent);
}
.channel-btn i {
@@ -456,7 +456,7 @@
border: none;
border-radius: 6px;
background: var(--lora-accent, #4285F4);
color: #fff;
color: var(--text-on-accent);
cursor: pointer;
font-size: 0.9em;
font-weight: 500;
@@ -614,7 +614,7 @@
.banner-history-action.banner-history-action-primary {
background: var(--lora-accent);
border-color: var(--lora-accent);
color: #fff;
color: var(--text-on-accent);
}
.banner-history-action.banner-history-action-secondary {