dark: make dropdowns readable (select options + pop menus)
- theme.css: colour-scheme per theme for select/input/textarea and explicit option/optgroup colours (native popup was rendering light text on white in dark mode); :checked uses the purple tint - _shared.css: token fallbacks on .mu-pop-* so the theme/language menus stay readable if tokens fail to load - VERSION 2026.10.24.7
This commit is contained in:
1 parent
347ab56546
commit
0aea027fe2
4 files changed
+46
-3
No files matched your search
@@ -15,7 +15,7 @@
|
||||
- SW ใหม่ → skipWaiting + clients.claim + แจ้งหน้าเว็บ
|
||||
============================================================ */
|
||||
|
||||
const VERSION = "2026.10.24.6"; /* bump เมื่อแก้ UI เพื่อบังคับให้ cache เก่าถูกทิ้ง */
|
||||
const VERSION = "2026.10.24.7"; /* bump เมื่อแก้ UI เพื่อบังคับให้ cache เก่าถูกทิ้ง */
|
||||
const CACHE = `atroute-${VERSION}`;
|
||||
const OFFLINE_URL = "/offline.html";
|
||||
const VERSION_URL = "/version.json";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"app": "Atroute",
|
||||
"version": "2026.10.24.6",
|
||||
"builtAt": "2026-11-04T02:06:43",
|
||||
"version": "2026.10.24.7",
|
||||
"builtAt": "2026-11-04T02:23:45",
|
||||
"pwa": true
|
||||
}
|
||||
@@ -816,3 +816,13 @@ body:has(.mu-site-footer) .mu-footer { display: none; }
|
||||
.mu-update-toast { transition: none; }
|
||||
.mu-update-dot { animation: none; }
|
||||
}
|
||||
|
||||
/* กันกรณีโทเคนโหลดไม่ครบ (เช่น cache เก่า) — dropdown ต้องอ่านออกเสมอ */
|
||||
.mu-pop-panel { background: var(--c-surface, #fff); border-color: var(--c-border, #e7e2f6); }
|
||||
:root[data-theme="dark"] .mu-pop-panel { background: var(--c-surface, #171225); border-color: var(--c-border, #352b52); }
|
||||
.mu-pop-item { color: var(--c-ink, #1f2a44); }
|
||||
:root[data-theme="dark"] .mu-pop-item { color: var(--c-ink, #ece9f7); }
|
||||
.mu-pop-item[data-active="1"] { background: var(--c-tint-purple, #f4f1fb); color: var(--c-brand-ink, #7a4cc0); }
|
||||
:root[data-theme="dark"] .mu-pop-item[data-active="1"] { background: var(--c-tint-purple, #241c3b); color: var(--c-brand-ink, #b892f5); }
|
||||
.mu-pop-btn { background: var(--c-surface, #fff); color: var(--c-brand-ink, #7a4cc0); }
|
||||
:root[data-theme="dark"] .mu-pop-btn { background: var(--c-surface, #171225); color: var(--c-brand-ink, #b892f5); }
|
||||
@@ -143,3 +143,36 @@ button {
|
||||
transition: background-color .18s ease, color .18s ease;
|
||||
}
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
dropdown / <select> — ต้องอ่านออกทั้ง light และ dark
|
||||
ปัญหาเดิม: select ใช้ color ของธีม แต่ option ใช้สีระบบ (ขาว-ขาว)
|
||||
แก้: บังคับ color-scheme ตามธีม + กำหนดสี option ให้ตรงโทเคน
|
||||
============================================================ */
|
||||
select,
|
||||
input,
|
||||
textarea {
|
||||
color-scheme: inherit;
|
||||
}
|
||||
:root[data-theme="dark"] select,
|
||||
:root[data-theme="dark"] input,
|
||||
:root[data-theme="dark"] textarea {
|
||||
color-scheme: dark;
|
||||
}
|
||||
:root[data-theme="light"] select,
|
||||
:root[data-theme="light"] input,
|
||||
:root[data-theme="light"] textarea {
|
||||
color-scheme: light;
|
||||
}
|
||||
option,
|
||||
optgroup {
|
||||
background-color: var(--c-surface);
|
||||
color: var(--c-ink);
|
||||
}
|
||||
/* Firefox: สีของ popup ตามสี option ที่ประกาศไว้ */
|
||||
@supports (-moz-appearance: none) {
|
||||
option:checked {
|
||||
background-color: var(--c-tint-purple);
|
||||
color: var(--c-brand-ink);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user