fix(website): center home promo close icon - #989
Merged
Conversation
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.
Problem / background
首页欢迎优惠弹窗右上角关闭符号使用文本
×,在不同字体和浏览器中会受字形基线影响,视觉上无法在按钮内上下左右居中。Evidence
本地首页
http://localhost:4000/的弹窗中可复现;替换为 SVG 图标后,浏览器测得图标与按钮中心的水平、垂直偏差均为 0px。Root cause
文本
×的字形包围盒不等于按钮内容盒,leading-none不能消除字体基线偏移。Scope / design
仅修改
website/src/components/welcome-promo-modal.tsx:使用现有lucide-react的X图标,保留按钮的 flex 居中布局并移除默认内边距。弹窗状态、关闭交互、文案和路由均不变。Impact / risks
仅影响官网
newapi-web首页优惠弹窗的关闭按钮呈现;不涉及 Go 控制台、router、数据库或基础设施。风险低。Validation / acceptance
bun test src/components/welcome-promo-modal.test.tsbun run typecheckbun run lint(仅现有<img>性能 warning)bun run build合并后请由 website workflow 部署
newapi-web。