Repository navigation
feat(preview): 放大预览遮罩加轻模糊 - #70
Merged
Merged
Conversation
双击放大后背景(画布/历史列表/结果区)原本只是压暗,文字和卡片全都清晰可见, 与浮在上面的图抢注意力。现在遮罩加 4px 模糊。 - 新增 token `--scrim-blur-soft: blur(4px) saturate(0.96)`:预览是「看这张图」, 用弹窗那档 10px 会把页面糊成一片,也看不出图是从哪儿放大的 - 新增公共类 `.zoom-overlay`(底色 --scrim-bg + 上面那档模糊),ZoomModal 改挂它 - 顺带收口:遮罩原来在 TSX 里写 `bg-black/60`,现在是 token;surfaceAudit 里那条 bg-black/60 豁免随之删除(所有遮罩同源,不留例外) - 回归用例:遮罩挂 .zoom-overlay 且不写死底色;断言里避开字面量(审计把 TSX 里 任何 bg-黑/白 写法都算违规,注释也算) 实测:getComputedStyle(overlay).backdropFilter = "blur(4px) saturate(0.96)", 背景为 rgba(20,26,31,.62);截图确认历史列表文字已看不清、页面轮廓仍在。
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.
双击放大后,遮罩原本只是压暗(TSX 里写死
bg-black/60),背景文字和卡片全清晰可见,跟浮在上面的图抢注意力。现在加 4px 轻模糊。--scrim-blur-soft: blur(4px) saturate(0.96):预览是"看这张图",用弹窗那档 10px 会把页面糊成一片,也看不出图是从哪儿放大的.zoom-overlay(--scrim-bg+ 上面那档模糊),ZoomModal改挂它surfaceAudit里bg-black/60那条豁免随之删除实测:
getComputedStyle(overlay).backdropFilter = blur(4px) saturate(0.96);截图确认历史列表文字已看不清、页面轮廓仍在。前端 1069 用例全过(+1:遮罩挂
.zoom-overlay且不写死底色);tsc、eslint、build、check_docs.py通过。