From 123d9161bd48d57bfda1e7eb70de4131be18b7e6 Mon Sep 17 00:00:00 2001 From: argszero Date: Mon, 28 Sep 2026 04:59:03 +0800 Subject: [PATCH] docs(ui): name the stat-card selector the stylesheet actually defines `ui/README.md` said the stat-card hover lift lives on `.stat:hover`, and the comment above `.stat-card` in `ui/css/style.css` said that class is "provided as an alias of `.stat`". Neither is true: the stylesheet has zero `.stat` rules, `class="stat"` appears nowhere in `ui/`, and the only `.stat` text left in the sheet sits inside that comment. `75dcb2c` (#154) deleted the `.stat` family and moved to the prototype name `.stat-card`; it updated neither the README line (`bbde077` / #52 wrote it when the name was still `.stat`) nor the comment it wrote in the same commit. The hover lift has been on `.stat-card:hover` (ui/css/style.css:1110) ever since. Name the selector that has a rule, and say where the old name went. The stylesheet token is bumped because this touches ui/css/style.css. --- ui/README.md | 2 +- ui/css/style.css | 3 ++- ui/index.html | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/README.md b/ui/README.md index 58dd4ac..6664771 100644 --- a/ui/README.md +++ b/ui/README.md @@ -159,7 +159,7 @@ ui/ ## 动效与系统偏好约定(v1.18,rant 2026-08-17T18:06:09 E) - **按压反馈**:`.btn:active:not(:disabled) { transform: scale(0.98) }`(配合 `.btn` 既有 `transition: all .15s`);disabled 按钮不触发; -- **统计卡 hover**:`.stat:hover` `translateY(-2px)` + 边框/阴影提升(与 `.card:hover` 语言一致,过渡 0.15–0.18s); +- **统计卡 hover**:`.stat-card:hover` `translateY(-2px)` + 边框/阴影提升(与 `.card:hover` 语言一致,过渡 0.15–0.18s);⚠️ 2026-09-11 组件层(`75dcb2c` / #154)更正:本条原写 `.stat:hover` —— 那次改动删掉了 `.stat` 整族、改用原型规范名 `.stat-card`,样式表里**从未**保留 `.stat` 规则,今天按本条写 `class="stat"` 的元素不匹配任何声明; - **数字跳动**:`bump(el)` 助手(remove `.bump` → reflow → add,重放 `@keyframes numJump`:`translateY(-3px) scale(1.02)`,0.35s);**接入 3 处余额变化点**(共 4 次 `bump()` 调用)——钱包充值(`#side-balance` + `#wallet-balance`)、运营者给自己充值(`u.email === D.USER.email` 行内判断)、聊天消费扣款;⚠️ 2026-08-19 零 mock 重构(`89963f3` / #94)更正:本条原写「4 处」,多出来的那处是**加额批准** —— 它当时在本地 mock 分支里就地改 `D.USER.balance` 之后跳动,改成真实 API(`approveRaise()` 成功后只 `loadAdmin()` 刷新列表)时随本地改动一并消失;同一次重构把「运营者给自己充值」的守卫从具名布尔变量改成上面的行内比较式。`#side-balance` 为 inline 元素需 `display:inline-block` 才可 transform; - **系统偏好**:`@media (prefers-reduced-motion: reduce)` 全局压 `animation-duration`/`transition-duration` 到 0.01ms、`animation-iteration-count: 1`、`scroll-behavior: auto`——**禁用过渡/动画但保留全部功能**;新增加动画时不得绕过此规则。 diff --git a/ui/css/style.css b/ui/css/style.css index 0043af4..eed9c6f 100644 --- a/ui/css/style.css +++ b/ui/css/style.css @@ -1099,7 +1099,8 @@ mark { .split > .card + .card, .card-grid > .card + .card, .card-grid-3 > .card + .card { margin-top: 0; } /* stat-card:原型统计卡(等宽大数值 + 单位 + 可选 delta); - 作为 .stat 的别名提供,供 PR4–PR6 直接按原型类名书写 */ + #154 起以原型规范名取代历史名 .stat(那一整族规则已删,这里**没有**别名规则), + 供 PR4–PR6 直接按原型类名书写 */ .stat-card { background: var(--bg-card); border: 1px solid var(--border); diff --git a/ui/index.html b/ui/index.html index 6ed1d54..eaf1048 100644 --- a/ui/index.html +++ b/ui/index.html @@ -5,7 +5,7 @@ AITokenPool - +