dark: make dropdowns readable (select options + pop menus)

- theme.css: form controls inherit color-scheme per theme, and explicit
  dark/light overrides so the native <option> popup is not white-on-white;
  option/optgroup use --c-surface/--c-ink, :checked uses the purple tint
- _shared.css: .mu-pop-panel/.mu-pop-item/.mu-pop-btn carry token fallbacks so
  the theme/lang menus stay readable even if tokens are missing (stale cache)
- VERSION 2026.09.27.128
This commit is contained in:
Bkk1234 committed 2026-11-04 02:24:32 +07:00
1 parent 14e7ec524f
commit d155d479ad
5 files changed
+69 -26

No files matched your search

+33
View File
@@ -217,3 +217,36 @@ button {
:root[data-theme="dark"] .mu-nearby { background: var(--c-surface); border-color: var(--c-border); }
:root[data-theme="dark"] .mu-live-clock-time,
:root[data-theme="dark"] .mu-stop-hero-title { color: var(--c-ink); }
/* ============================================================
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);
}
}