/* 相册节点体(2026-11-26) * 宿主只给一块空容器(.iwb-plugin-node-body),所有排版由这里决定。 * 尺寸全部用像素而不是 rem:节点宽度是可拖拽的(264~600),rem 会跟着宿主字号漂移。 */ .iwb-album { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; font-size: 11px; color: var(--iwb-node-text); } .iwb-album-bar, .iwb-album-tools, .iwb-album-pager, .iwb-album-onepage { display: flex; align-items: center; gap: var(--iwb-space-6); padding: var(--iwb-space-4) var(--iwb-space-8); flex: 0 0 auto; } .iwb-album-bar { border-bottom: 1px solid color-mix(in srgb, var(--iwb-border) 55%, transparent); height: 26px; } .iwb-album-tools { padding-top: var(--iwb-space-2); padding-bottom: var(--iwb-space-2); } .iwb-album-toggle { display: inline-flex; align-items: center; gap: var(--iwb-space-4); font-size: var(--iwb-font-2xs); color: var(--iwb-node-text2); white-space: nowrap; cursor: pointer; } .iwb-album-track { width: 22px; height: 12px; border-radius: 999px; background: var(--iwb-border); position: relative; flex: 0 0 auto; transition: background .15s; } .iwb-album-track i { position: absolute; top: 1.5px; left: 1.5px; width: 9px; height: 9px; border-radius: 50%; background: var(--iwb-panel); transition: left .15s; } .iwb-album-track.on { background: var(--iwb-brand); } .iwb-album-track.on i { left: 11.5px; } .iwb-album-count { margin-left: auto; font-size: var(--iwb-font-2xs); color: var(--iwb-node-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .iwb-album-count b { color: var(--iwb-node-text); font-weight: 600; } .iwb-album-btn { height: 21px; padding: 0 var(--iwb-space-8); border: 1px solid var(--iwb-border); border-radius: var(--iwb-radius-chip); background: var(--iwb-panel); color: var(--iwb-node-text2); font-size: var(--iwb-font-2xs); display: inline-flex; align-items: center; gap: var(--iwb-space-4); cursor: pointer; white-space: nowrap; } .iwb-album-btn:hover { border-color: var(--iwb-brand); color: var(--iwb-node-text); } .iwb-album-btn.on { border-color: var(--iwb-brand); color: var(--iwb-node-text); } /* 清空:常驻在顶栏最右,只有相册里有图时才出现。hover 转红是为了和「添加」一类中性操作区分开。 */ .iwb-album-clear { flex: 0 0 auto; padding: 0 var(--iwb-space-6); } .iwb-album-clear:hover { border-color: #c0392b; color: #c0392b; } .iwb-album-seg { margin-left: auto; display: inline-flex; border: 1px solid var(--iwb-border); border-radius: var(--iwb-radius-chip); overflow: hidden; } .iwb-album-seg span { width: 21px; height: 21px; display: inline-flex; align-items: center; justify-content: center; font-size: var(--iwb-font-2xs); color: var(--iwb-node-text2); background: var(--iwb-panel); cursor: pointer; } .iwb-album-seg span.on { background: var(--iwb-brand); color: var(--iwb-on-brand); } .iwb-album-grid { display: grid; gap: var(--iwb-space-4); padding: var(--iwb-space-2) var(--iwb-space-8) var(--iwb-space-6); overflow: hidden; align-content: start; flex: 1 1 auto; min-height: 0; } /* 格子固定正方形(2026-11-26):此前高度由图片比例决定 —— 4 张 16:9 宽图会变成 22px 细条、 竖图撑到 167px,和 capacityOf() 按方形算的容量是两套账(最后一行常被裁一半)。 aspect-ratio 让每一格高 = 宽,容量因此可精确预测,宫格也终于整齐。 padding:0 必须显式写: