From 579156b87e7832ab6796e7e296fb40404772a2a8 Mon Sep 17 00:00:00 2001 From: mlikewind <1679991669@qq.com> Date: Wed, 19 Aug 2026 09:36:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(windows/theme):=20=E4=BF=AE=E5=A4=8DWindows?= =?UTF-8?q?=E6=B7=B1=E8=89=B2=E6=A8=A1=E5=BC=8F=E4=B8=8B=E6=96=87=E5=AD=97?= =?UTF-8?q?=E4=B8=8D=E5=8F=AF=E8=AF=BB=20(#148)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: Windows端深色模式部分文字回落黑色,背景与文字对比度不足无法阅读。 Changes: 1. index.html 增加 color‑scheme meta,适配WebView2原生控件 2. base.css 给 html/body/#root 增加 --foreground兜底颜色 3. 将深色选择器由 @media prefers-color-scheme / .dark 迁移至 [data‑theme‑type=dark] 4. theme.css 补齐缺失语义主题变量别名 5. chart.tsx 更新图表深色主题选择器 Validation: bun run typecheck 通过 bun run lint:无新增错误,warning为存量mock文件未使用变量 Follow‑up: 1. Tailwind dark变体需要重定向到data‑theme‑type 2. radio‑group选中圆点视觉优化 3. code‑tokens还有部分硬编码浅色token待处理 --- windows/tauri/index.html | 1 + windows/tauri/src/styles/base.css | 3 ++ .../tauri/src/styles/rendered-code-tokens.css | 48 +++++++++---------- windows/tauri/src/styles/scrollbars.css | 2 +- windows/tauri/src/styles/theme.css | 23 +++++++++ windows/tauri/src/ui/chart.tsx | 2 +- 6 files changed, 52 insertions(+), 27 deletions(-) diff --git a/windows/tauri/index.html b/windows/tauri/index.html index 3079979ba..b4e5bf26d 100644 --- a/windows/tauri/index.html +++ b/windows/tauri/index.html @@ -4,6 +4,7 @@ + Lithe