面板:修复模型下拉白底看不清(option跟随主题色 + color-scheme)

This commit is contained in:
Zhuyuan Operations 2026-08-04 01:15:13 +08:00
parent 9b84afa053
commit c057319bc7

View File

@ -749,10 +749,12 @@ PAGE = r"""<!DOCTYPE html>
:root{
--bg:#0e1014; --side:#12151c; --panel:#161a22; --me:#3b7bff; --egg:#1c2230;
--txt:#e9ebf1; --mut:#8a93a8; --line:#262b36; --code:#0a0c10; --accent:#5fd07a;
color-scheme:dark;
}
body.light{
--bg:#f4f6fb; --side:#ffffff; --panel:#ffffff; --me:#3b7bff; --egg:#eef1f7;
--txt:#1a1d24; --mut:#6b7384; --line:#e3e7ef; --code:#f0f2f7; --accent:#2faa55;
color-scheme:light;
}
*{box-sizing:border-box;}
html,body{height:100%;margin:0;}
@ -793,6 +795,8 @@ PAGE = r"""<!DOCTYPE html>
#topbar .sp{flex:1;}
#topbar button, #topbar select, .menu button{background:var(--bg);color:var(--txt);border:1px solid var(--line);
border-radius:8px;padding:6px 10px;font-size:13px;cursor:pointer;font-family:inherit;}
/* 下拉选项强制跟随主题色否则展开后 option 用系统白底 + 继承浅色文字 = 白底白字看不清 */
#topbar select option{background:var(--bg);color:var(--txt);}
#topbar button:hover{border-color:var(--me);}
.menu{position:absolute;z-index:30;background:var(--panel);border:1px solid var(--line);border-radius:10px;
box-shadow:0 8px 24px rgba(0,0,0,.3);padding:6px;display:flex;flex-direction:column;gap:4px;min-width:160px;}