[fix] input 欄位融進 card 看不見:修 --input 邊框對比 - #59
Merged
Conversation
✅ SonarQube Quality Gate passed — pathorsAI_internal0 open issues on this PR. |
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.
問題:card 裡的 input 常常看不見——欄位融進卡片。
根因(客觀 bug):shadcn 的 Input 是
border border-input+bg-transparent(透明背景直接透出 card 色)。而 light 模式的--input=oklch(0.9809),比--card的oklch(0.9784)還亮——邊框比卡片還淺=隱形,加上背景透明透出卡片色,整個欄位就消失了。(--input甚至比一般分隔線--border0.9317 還亮,是 token 生成時的異常。)修法(token 層級,不動
components/ui/,保持 shadcn 可更新):--input0.9809 → 0.8900(明顯比 card 深,欄位讀得出邊界)--input0.3020 → 0.3400(跟 card 0.2097 拉開;shadcn 的dark:bg-input/30也以此上色,填色一併變明顯)影響全站所有 Input / Select / Textarea 的邊框(它們都用
border-input),login / 各表單頁一致受惠。build 過。