From f83ed2e08a72fcffe5d8cbfaec55705e4d2c9f3a Mon Sep 17 00:00:00 2001 From: qiqi Date: Wed, 2 Dec 2026 17:31:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(tokens):=20=E4=B8=8B=E8=BD=BD=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=B0=BA=E5=AF=B8=E6=8F=90=E5=8D=87=E4=B8=BA=E6=AD=A3?= =?UTF-8?q?=E5=BC=8F=20token=EF=BC=88--iwb-dl-size/radius/inset/gap?= =?UTF-8?q?=EF=BC=89=EF=BC=8C=E5=AE=BF=E4=B8=BB=E4=B8=8E=20gallery=20?= =?UTF-8?q?=E5=85=B1=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/gen-tokens.js | 5 +++++ src/design-tokens.css | 4 ++++ style.css | 8 ++++---- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/scripts/gen-tokens.js b/scripts/gen-tokens.js index 0bcfa73..30e92ba 100644 --- a/scripts/gen-tokens.js +++ b/scripts/gen-tokens.js @@ -116,6 +116,11 @@ const SCALE = [ ['--iwb-radius-panel', '12px', '面板/工具栏'], ['--iwb-radius-popover', '14px', '浮层/菜单/右键'], ['--iwb-radius-full', '999px', '圆形/药丸'], + // 2026-12-02:下载/浮层「圆形图标按钮」的一组尺寸(宿主 style.css 与 gallery 插件共用同一套变量) + ['--iwb-dl-size', '28px', '下载按钮:直径'], + ['--iwb-dl-radius', 'var(--iwb-radius-full)', '下载按钮:圆角(胶囊/圆)'], + ['--iwb-dl-inset', '8px', '下载按钮:距容器右下角内距'], + ['--iwb-dl-gap', '4px', '下载按钮:多按钮之间的间距'], ['--iwb-font-2xs', '10px', '极小标注:徽标角标/画布坐标/缩略图角标(2026-11-24 承认它,此前 29 处裸写)'], ['--iwb-font-xs', '11px', 'M4 字号:状态栏/徽标'], ['--iwb-font-sm', '12px', '标签/次要正文'], diff --git a/src/design-tokens.css b/src/design-tokens.css index af372ae..54b0676 100644 --- a/src/design-tokens.css +++ b/src/design-tokens.css @@ -119,6 +119,10 @@ --iwb-radius-panel: 12px; /* 面板/工具栏 */ --iwb-radius-popover: 14px; /* 浮层/菜单/右键 */ --iwb-radius-full: 999px; /* 圆形/药丸 */ + --iwb-dl-size: 28px; /* 下载按钮:直径 */ + --iwb-dl-radius: var(--iwb-radius-full); /* 下载按钮:圆角(胶囊/圆) */ + --iwb-dl-inset: 8px; /* 下载按钮:距容器右下角内距 */ + --iwb-dl-gap: 4px; /* 下载按钮:多按钮之间的间距 */ --iwb-font-2xs: 10px; /* 极小标注:徽标角标/画布坐标/缩略图角标(2026-11-24 承认它,此前 29 处裸写) */ --iwb-font-xs: 11px; /* M4 字号:状态栏/徽标 */ --iwb-font-sm: 12px; /* 标签/次要正文 */ diff --git a/style.css b/style.css index 9f88fdf..656ecd2 100644 --- a/style.css +++ b/style.css @@ -2568,12 +2568,12 @@ body .iwb-history-embedded .iwb-history-item.iwb-history-selected:hover img { /* 结果图落地状态(2026-12-02):出图后先排队/下载,就绪再换本地 objectURL */ .iwb-rimg { position: relative; } .iwb-rimg-pending .iwb-result-thumb { opacity: .55; filter: saturate(.8); } -.iwb-rimg-flag { position: absolute; left: var(--iwb-space-4); top: var(--iwb-space-4); z-index: var(--iwb-z-anchor); padding: 0 var(--iwb-space-8); border-radius: var(--iwb-radius-full); font-size: var(--iwb-font-xs); line-height: 16px; color: var(--iwb-text); background: var(--iwb-panel); border: 1px solid var(--iwb-border2); opacity: .92; } +.iwb-rimg-flag { position: absolute; left: var(--iwb-space-4); top: var(--iwb-space-4); padding: 0 var(--iwb-space-8); border-radius: var(--iwb-radius-full); font-size: var(--iwb-font-xs); line-height: 16px; color: var(--iwb-text); background: var(--iwb-panel); border: 1px solid var(--iwb-border2); opacity: .92; } .iwb-rimg-flag-err { color: var(--iwb-err); border-color: var(--iwb-err-bd); background: var(--iwb-err-bg); } /* 输出节点体的落地角标(2026-12-02) */ .iwb-out-cell { position: relative; } -.iwb-out-cell-flag { position: absolute; left: var(--iwb-space-4); top: var(--iwb-space-4); z-index: var(--iwb-z-anchor); padding: 0 var(--iwb-space-8); border-radius: var(--iwb-radius-full); font-size: var(--iwb-font-xs); line-height: 16px; color: var(--iwb-text); background: var(--iwb-panel); border: 1px solid var(--iwb-border2); opacity: .92; } +.iwb-out-cell-flag { position: absolute; left: var(--iwb-space-4); top: var(--iwb-space-4); padding: 0 var(--iwb-space-8); border-radius: var(--iwb-radius-full); font-size: var(--iwb-font-xs); line-height: 16px; color: var(--iwb-text); background: var(--iwb-panel); border: 1px solid var(--iwb-border2); opacity: .92; } .iwb-out-cell-flag-err { color: var(--iwb-err); border-color: var(--iwb-err-bd); background: var(--iwb-err-bg); } /* 生成中:旧图压暗 + 「生成中」角标(不动 data,失败即恢复) */ @@ -2581,9 +2581,9 @@ body .iwb-history-embedded .iwb-history-item.iwb-history-selected:hover img { .iwb-out-cell-flag-busy { color: var(--iwb-warn); border-color: var(--iwb-warn-bd); background: var(--iwb-warn-bg); } /* 2026-12-02:下载浮层改右下角圆形图标(矮图不再被横条挡住中心) */ -.iwb-dl-corner { position: absolute; right: var(--iwb-space-8); bottom: var(--iwb-space-8); display: flex; gap: var(--iwb-space-4); z-index: var(--iwb-z-anchor); opacity: 0; transition: opacity .15s ease; } +.iwb-dl-corner { position: absolute; right: var(--iwb-dl-inset); bottom: var(--iwb-dl-inset); display: flex; gap: var(--iwb-dl-gap); opacity: 0; transition: opacity .15s ease; } .iwb-rimg:hover .iwb-dl-corner, .iwb-rimg:focus-within .iwb-dl-corner, .iwb-out-cell:hover .iwb-dl-corner, .iwb-out-cell:focus-within .iwb-dl-corner { opacity: 1; } -.iwb-dl-round { width: 28px; height: 28px; border-radius: var(--iwb-radius-full); border: 1px solid var(--iwb-border2); background: var(--iwb-panel); color: var(--iwb-text); display: grid; place-items: center; font-size: var(--iwb-font-xs); line-height: 1; cursor: pointer; box-shadow: var(--iwb-elevation-1); padding: 0; } +.iwb-dl-round { width: var(--iwb-dl-size); height: var(--iwb-dl-size); border-radius: var(--iwb-dl-radius); border: 1px solid var(--iwb-border2); background: var(--iwb-panel); color: var(--iwb-text); display: grid; place-items: center; font-size: var(--iwb-font-xs); line-height: 1; cursor: pointer; padding: 0; } .iwb-dl-round:hover { background: var(--iwb-hover); } .iwb-dl-round-primary { color: var(--iwb-brand-text, var(--iwb-text)); border-color: var(--iwb-border2); }