refactor(canvas): 浮层 inset token 体系重建 + 全量应用(审计 D2/P0-2)
#116 曾引入 --canvas-inset-* token,上游合并后丢失。本轮重新建立画布 安全区 token 并全量替换硬编码定位,所有替换值等价(零视觉变化)。 新增 token(globals.css 6b 段,紧随 Elevation): - --canvas-inset-x/y: 16px 浮层水平/垂直安全区 - --canvas-topbar-h: 64px 顶部栏高度 - --canvas-topbar-offset: 72px 顶栏下方浮层顶部偏移 - --canvas-dock-popover-offset: 50px dock 弹出面板底部偏移 替换: - dock 根 inset-x-4/bottom-4 → --canvas-inset-x/y - dock 弹出面板 bottom-[50px] ×4(appearance/add-node/zoom/asset-tray)→ --canvas-dock-popover-offset - 顶栏 h-16/px-4 → --canvas-topbar-h/--canvas-inset-x - 活动任务面板 top-[72px] → --canvas-topbar-offset 活动任务面板 right-3(12px) 刻意保留:与 16px 安全区不同且改它会级联到 --canvas-panel-width 公式(PR #130 领地),不宜混入。
This commit is contained in:
1 parent
d6a42d53a1
commit
bd73d0a3b7
6 files changed
+14
-7
No files matched your search
@@ -94,7 +94,7 @@ export function CanvasZoomControls({ scale, onScaleChange, onReset, isMiniMapOpe
|
||||
animate={{ opacity: 1, y: 0, scale: 1 }}
|
||||
exit={{ opacity: 0, y: 9, scale: 0.96 }}
|
||||
transition={aceternityMotion.spring.panel}
|
||||
className="aceternity-floating-panel absolute bottom-[50px] left-0 w-[220px] overflow-hidden rounded-[var(--panel-radius)] border p-2.5 backdrop-blur-2xl"
|
||||
className="aceternity-floating-panel absolute bottom-[var(--canvas-dock-popover-offset)] left-0 w-[220px] overflow-hidden rounded-[var(--panel-radius)] border p-2.5 backdrop-blur-2xl"
|
||||
style={{ background: theme.spatial.elevated, borderColor: theme.toolbar.border, color: theme.node.text, boxShadow: `0 28px 80px ${theme.spatial.shadow}` }}
|
||||
>
|
||||
<div className="absolute inset-x-10 top-0 h-px" style={{ background: `linear-gradient(90deg, transparent, ${theme.spatial.glowStrong}, transparent)` }} />
|
||||
|
||||
Reference in new issue
Block a user