Files
iwb-plugins-desktop/album/PITFALLS.md
T
2026-11-26 07:31:59 +08:00

28 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# album 插件避坑事项
> 维护:改宫格 hover / 尺寸后先读本文件。
> 版本:1.1.4(2026-11-26)
## 1. 网格 hover 只做 scale,不位移
- 宫格是固定正方形网格;hover 用 `translateY` 会让相邻格的 hover 判定抖动;
- 当前方案:`scale(1.08)` + 双层深阴影 + 2px 品牌描边(`outline` 内缩,不改 border 宽度,图片不会被挤动);
- 所有过渡走 `--iwb-motion-hover/ease-hover`,并支持 `prefers-reduced-motion`。
## 2. 不要把路径写成 `#` 或相对 URL
- 相册只接收本地图片路径;远程 URL 会在我这边加载失败;
- 文件夹导入后路径要保留绝对路径,不能只存文件名。
## 3. 版本与市场
- 改 `styles.css` 必须同时 bump `package.json` + 入口 `version`(若入口有),否则市场按版本比较不会更新;
- 本文件不打包,避免增大 zip。
## 4. 最小回归清单
- [ ] 宫格 hover 只缩放,相邻格不抖
- [ ] 深色/浅色主题下描边都可见
- [ ] 选中态(1px)与 hover(2px)叠加不冲突
- [ ] 减少动效偏好下无缩放