Repository navigation
fix(client): 设置页开关尺寸回到宿主原语(#109 收尾) - #112
Merged
Merged
Conversation
40x24 的尺寸覆盖让五个开关比宿主自带开关胖一圈:宽 +4px(+11%)、 高 +4px(+20%)、滑块 16 → 20px(+25%),用户 2026-10-30 反馈 「感觉我们的要胖一些」。尺寸交还 Switch.module.css:轨道 36x20、 滑块 16px、行程 16px;PAGE_CSS 只保留 160ms 同步过渡与按压缩放, 颜色、圆角、焦点环、禁用态本就在原语里。 - 新增 styles.test.ts 用例:PAGE_CSS 不得给 .cc-switch 加宽高覆盖 - 同步 page-styles 注释、client-and-settings 文档与 CHANGELOG - 重建 lib/client.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#109 的收尾:换用宿主
Switch后仍沿用了旧设计画布的 40×24,用户实测它比 DSH 自带开关胖。改了什么
Switch完全同尺寸(行程仍是 16px,原语的translateX(16px)正好落位)。tests/styles.test.ts用例:PAGE_CSS不得给.cc-switch加宽高覆盖,防止以后再次漂移。page-styles.ts注释、docs/agent-reference/client-and-settings.md、CHANGELOG,重建lib/client.js。尺寸对照
上表用宿主
0.2.2-alpha.2的真实主题变量 +Switch.module.css拼对照页,在无头 Chromium 里读getBoundingClientRect实测。验证
npm run typecheck通过npm test1142/1142 通过(新增 1 条)npm run build通过,lib/client.js已同步