feat(image-annotate): v1.20.0 去色下移为常用色第一格 + 头部控件全部定宽(不再被 flex 抵掉)
- 去色:头部按钮 → 常用色网格第一格(20px 同尺寸、虚线圆 + 斜圈) - 不可用上下文(文字色 / 未闭合钢笔)不再 hidden,改 disabled + 42% 不透明度,title 说明原因 - 头部定宽:色值框 flex 0 0 124px(原 0 1 150)、加「底色」tab 后色值框与图钉位置不动 - 常用色 16 → 15(亮紫让位,深紫保留),去色 + 15 = 8 列 2 行 - 删掉 :has(...[hidden]) 隐藏竖线的规则,头部结构变纯静态 - harness 231 项 / 真站 e2e 40 项
This commit is contained in:
1 parent
00a2699e89
commit
d16e68bfa9
8 files changed
+209
-111
No files matched your search
@@ -1804,12 +1804,8 @@
|
||||
/* 竖线:分隔「调哪个槽 / 取色工具 / 去色·钉住」三组,比空白更清楚,又不加边框重量 */
|
||||
.iwb-color-pop-bar { width: 1px; height: 16px; background: #313244; flex: 0 0 auto; }
|
||||
/* 「去色 | 图钉」整组贴最右(margin-left:auto)。这样色值框不用拉成一条长条去填空,
|
||||
头部是「左边调色槽与工具 / 右边两个开关」两段式,扫视时不会把 HEX 当成主角。 */
|
||||
头部是「左边调色槽与工具 / 右边一个开关」两段式,扫视时不会把 HEX 当成主角。 */
|
||||
.iwb-color-pop-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
|
||||
/* 没有可去色的上下文(未选中对象 / 文字色这种单槽)时「去色」是隐藏的,
|
||||
它前面那条竖线要一起藏掉,否则头部右侧会留下一截悬空的「||」;
|
||||
两条都藏掉后整组只剩图钉,竖线也不再夹在「色值 | 图钉」之间显得多余 */
|
||||
.iwb-color-pop-tools:has(> .iwb-color-pop-none[hidden]) > .iwb-color-pop-bar { display: none; }
|
||||
|
||||
.iwb-color-pop-tab {
|
||||
display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px;
|
||||
@@ -1832,16 +1828,28 @@
|
||||
background-image: linear-gradient(135deg, transparent calc(50% - 1px), #f38ba8 calc(50% - 1px), #f38ba8 calc(50% + 1px), transparent calc(50% + 1px));
|
||||
}
|
||||
.iwb-color-pop-tab[hidden] { display: none; }
|
||||
/* 去色(v1.19):原来的「无」改名挪位。虚线框 + 红斜圈,和「实心色块」区分开;
|
||||
它是开关不是色块,所以不用填充色表达状态,只换边框/文字色。 */
|
||||
/* 去色(v1.20,用户 2026-11-10):头部那颗带文字的按钮下移到「常用色第一格」,
|
||||
尺寸、间距跟色块完全一致(20px 圆),只是画虚线边框 + 斜圈图标 ——
|
||||
它是开关不是色块,所以不用填充色表达状态,只换边框/图标色。
|
||||
永远显示(不可用时不 hidden,只 disabled + 变灰),位置才记得住、头部也不重排。 */
|
||||
.iwb-color-pop-none {
|
||||
flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px;
|
||||
border: 1px dashed #585b70; border-radius: 7px; background: transparent; color: #a6adc8;
|
||||
font: 500 11.5px/1 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; cursor: pointer;
|
||||
flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
|
||||
width: 20px; height: 20px; padding: 0; margin: 0; box-sizing: border-box;
|
||||
border: 1px dashed #585b70; border-radius: 50%; background: transparent; color: #a6adc8;
|
||||
cursor: pointer; transition: transform 0.08s ease, border-color 0.12s ease, color 0.12s ease;
|
||||
}
|
||||
.iwb-color-pop-none svg { flex: 0 0 auto; width: 12px; height: 12px; }
|
||||
/* hover 只对可用态生效:disabled 时不该有放大反馈,否则看着像能点 */
|
||||
.iwb-color-pop-none:not(:disabled):hover { border-color: #f38ba8; color: #f38ba8; transform: scale(1.14); }
|
||||
.iwb-color-pop-none.active { border-style: solid; border-color: #f38ba8; color: #f38ba8; background: rgba(243, 139, 168, 0.14); }
|
||||
/* 不可用:整颗压到 42% 不透明度 —— 灰到能看出「这里有个去色,但现在用不上」,
|
||||
但不至于淡到看不见(32% 时在深底上几乎消失,等于又变成了「消失」,只是慢一点)。
|
||||
cursor 保持 default,不给 pointer。 */
|
||||
.iwb-color-pop-none:disabled,
|
||||
.iwb-color-pop-none.is-disabled {
|
||||
opacity: 0.42; cursor: default; color: #8b8fa8; border-color: #4a4a5e;
|
||||
background: transparent; transform: none;
|
||||
}
|
||||
.iwb-color-pop-none svg { flex: 0 0 auto; }
|
||||
.iwb-color-pop-none:hover { border-color: #f38ba8; color: #f38ba8; }
|
||||
.iwb-color-pop-none.active { border-style: solid; border-color: #f38ba8; color: #f38ba8; background: rgba(243, 139, 168, 0.12); }
|
||||
.iwb-color-pop-none[hidden] { display: none; }
|
||||
.iwb-color-pop-body { display: flex; align-items: stretch; gap: 10px; }
|
||||
.iwb-color-pop-picker { display: flex; gap: 8px; flex: 0 0 auto; }
|
||||
@@ -1870,11 +1878,12 @@
|
||||
/* display:flex 会盖掉 [hidden] 的默认 display:none,必须显式写一条 */
|
||||
.iwb-color-group[hidden] { display: none; }
|
||||
|
||||
/* 色值输入固定 150px:够显示 #RRGGBB 还有余量,又不会被 flex-grow 拉成一条长条
|
||||
(拉长后视觉重心全跑到输入框上,色块反倒成了配角)。
|
||||
文字工具多出「底色」tab 时按 0 1 150 自动收缩,min-width 保证七个字符看得全。 */
|
||||
/* 色值输入定宽 124(v1.20 由 150 收窄、且不再可缩):#RRGGBB 七个字符 55px 出够,
|
||||
v1.19 用的是 flex:0 1 150px,文字工具多出「底色」tab 时它会自己缩到 147 ——
|
||||
头部宽度就跟着上下文抖,最后把「去色」整颗挤掉(用户截图里那次)。
|
||||
现在头部每个元素都定宽:只有 gap 吸收亚像素误差,切工具不再重排。 */
|
||||
.iwb-editor-color-pop .iwb-editor-color-hex-input {
|
||||
flex: 0 1 150px; width: 150px; min-width: 58px; height: 26px; padding: 0 5px; text-align: center;
|
||||
flex: 0 0 124px; width: 124px; height: 26px; padding: 0 5px; text-align: center;
|
||||
font: 600 12px monospace; border-radius: 6px; box-sizing: border-box;
|
||||
}
|
||||
.iwb-editor-color-pop .iwb-editor-color-swatches {
|
||||
@@ -2248,7 +2257,8 @@
|
||||
#iwb-editor-overlay .iwb-editor-left .iwb-editor-zoom .iwb-editor-zoom-val,
|
||||
#iwb-editor-overlay .iwb-editor-left .iwb-editor-zoom .iwb-editor-zoom-fit { font-size: 12px; }
|
||||
|
||||
/* 调色面板本体 */
|
||||
#iwb-editor-overlay .iwb-color-pop-tab,
|
||||
#iwb-editor-overlay .iwb-color-pop-none { font-size: 12.5px; height: 26px; }
|
||||
/* 调色面板本体(v1.20:去色已下移到色块网格,这里只剩 tab 需要放大字号;
|
||||
去色是 20px 格子,高度必须跟色块一致,别被这条统一字号的规则顶成 26px) */
|
||||
#iwb-editor-overlay .iwb-color-pop-tab { font-size: 12.5px; height: 26px; }
|
||||
#iwb-editor-overlay .iwb-color-pop-none { width: 20px; height: 20px; }
|
||||
#iwb-editor-overlay .iwb-editor-color-pop .iwb-editor-color-hex-input { font-size: 13px; }
|
||||
Reference in new issue
Block a user