refactor(canvas): 硬编码字号/圆角清理 → 语义 token(审计 D1/P1-3) (#131)

清理画布组件散落的硬编码字号与圆角,统一走 token 体系:

字号:
- 新增 --fs-nano(7px) 覆盖原 text-[6px]/text-[7px] 子微型标注
  (角标计数、节点预览、% 后缀)
- text-[19px] → --fs-heading-lg(18px)

圆角(就近映射,±1~2px):
- rounded-[3px] → --r-xs | rounded-[5px] → --r-sm
- rounded-[6px] → --r-sm | rounded-[7px] → --r-md
- rounded-[18px] → --r-2xl

涉及 11 个组件文件。rounded-[1px](minimap 视口指示框,刻意尖角)保留。
颜色项(bg-white/border-stone)经核实均带 dark: 变体,属标准 Tailwind
双主题模式非误用,不在本轮处理。

Co-authored-by: sikongyue <3155157671@qq.com>
This commit is contained in:
爱笑的毛毛虫andsikongyue authored and GitHub committed 2026-08-04 21:20:53 +08:00
1 parent dcddc59d28
commit e84fbb8a76
11 files changed
+17 -16

No files matched your search

@@ -76,7 +76,7 @@ export function CanvasZoomControls({ scale, onScaleChange, onReset, isMiniMapOpe
{
id: "zoom-precision",
label: "精确缩放",
icon: <span className="flex items-baseline text-[var(--fs-micro)] font-bold tabular-nums"><span ref={dockLabelRef}>{Math.round(scale * 100)}</span><span className="ml-px text-[7px] opacity-55">%</span></span>,
icon: <span className="flex items-baseline text-[var(--fs-micro)] font-bold tabular-nums"><span ref={dockLabelRef}>{Math.round(scale * 100)}</span><span className="ml-px text-[var(--fs-nano)] opacity-55">%</span></span>,
active: precisionOpen,
onClick: () => setPrecisionOpen((value) => !value),
},