Repository navigation
fix(ui): 修复拾色主题下非首屏单行输入框文字偏底未居中问题 - #250
Merged
Merged
Conversation
PR 安全初筛 / Safety pre-check改动 3 个文件;高 0 项、中 0 项。 没发现需要特别留意的地方。自动初筛只能挡明显的,合并前仍需人工看过。 |
This branch was successfully deployed
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.
现象与原因
在「拾色(
shise)」皮肤的对话页(非首屏html.wel)下:#composer-inner使用align-items: flex-end,行高由40px的#btn-send决定;.mini-btn(32px + margin-block: 4px × 2 = 40px)和#btn-interject(34px + margin-block: 3px × 2 = 40px)已补齐至40px与发送键垂直居中;#input漏补了高度,仍沿用基础样式line-height: 24px; padding: 4px 0(总高仅32px),在flex-end容器里贴底排列,单行占位文字与光标比左右按钮中心低了4px。autoGrow()未重新触发,行内残留的旧style.height(如32px)也会继续压住单行高度。修复内容
gateway/web/style.css:新增html[data-skin="shise"]:not(.wel) #input{padding:8px 0},将非首屏单行#input总高补至24 + 8×2 = 40px,与40px的+/ 插话 / 发送按钮完全垂直居中;多行输入时按钮仍与末行居中对齐;:not(.wel)不影响首屏双行独立排布。gateway/web/app/05-composer.js:在autoGrow()下方监听document.documentElement的data-skin/data-fs变化并重算高度,避免切皮肤或切字号后行内旧高度导致偏底或裁切。gateway/tests/ui-skin-contrast.test.mjs:补齐样式与MutationObserver回归守卫。验证
app.js拼接语法校验通过。node scripts/test.mjs跑过ui-skin-contrast、stab-f-composer-input、stab-b-client、a0610-f1-frontend、a0610-f3-frontend全部通过。node scripts/pr-guard.mjs origin/main HEAD通过(高 0 项、中 0 项)。