fix(ui): add the global reset layer and align form/button geometry with the prototype - #159
Merged
Merged
Conversation
…th the prototype The whole global reset layer from docs/prototype/aitokenpool-console.html (lines 53-72) was dropped during the site-wide UI migration, so every form control without a class fell back to the browser's native rendering: `#login-email` measured 19px high, radius 0, `2px inset rgb(118,118,118)` border, and the classless auth tab rendered a `2px outset` 3D border. Headless computed-style probes over all 9 views found 108 such controls before this change and 0 after. Changes: - add the missing reset layer (img/svg, a, button, input|select|textarea, p/h1-h3 text-wrap) exactly as the prototype specifies. Element selectors keep specificity below the existing .btn/.input class rules. - add the missing `.num` rule (mono + tabular-nums) — only `.table .num` existed, so `.num` outside a table lost its alignment. - add the missing `.row` rule (flex, gap 10px, wrap) — the markup already used `class="row"` in 6 button rows and it had no styling at all. - add `.divider` as an alias of the historical `.login-divider`, and lift `.avatar` out of the `.user-chip` descendant selector. - align `.btn` (min-height 40px, padding 0 16px, font-size 13.5px, inline flex), `.btn-sm` (32px / 0 11px) and `.input` (padding 10px 12px, font-size 13.5px) with the prototype, and write the auth-tab border/background out explicitly. - give `class="input"` to the 12 login/register/verify/forgot inputs and rename the login divider to `.divider`; bump the cache-bust to 20260911-4. Verified: cargo test 148/148, cargo fmt --check, cargo clippy, node --check on all four ui/js bundles, i18n ZH/EN key sets exactly equal (762/762). Computed-style A/B against HEAD shows the reset resized no SVG icon and introduced no geometry change other than the intended prototype parity fixes.
argszero
added a commit
that referenced
this pull request
Sep 11, 2026
Release the global reset layer fix (PR #159, rant 2026-09-11T22:01:43). - Cargo.toml + Cargo.lock: 0.7.21 -> 0.7.22 - ui/index.html: cache-bust 20260911-4 -> 20260911-5 (5 refs) - CHANGELOG.md: v0.7.22 entry Gates: cargo test 148/148, cargo fmt --check, cargo clippy, node --check x4, i18n ZH 762 == EN 762.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the global reset layer that
docs/prototype/aitokenpool-console.html(lines 53–72) defines but which was dropped wholesale during the site-wide UI
migration, and fixes the form/button geometry that depended on it.
Because the reset was missing, every form control without a class fell back
to the browser's native rendering. Measured with a headless per-element
computed-style probe at 1912×836, the most visible cases were:
#login-email2px inset rgb(118,118,118), bg browser default10px 12px, radius 8px,1px solid var(--border).auth-tabs button(未选中)2px outset rgb(0,0,0)(native 3D button)0px none#guest-browse-btn.btn)#login-form .btn-primarypadding 8px 16px,min-height autopadding 0 16px,min-height 40pxA census over all 9 views counted 108 browser-default-styled controls before
this change and 0 after (excluding checkbox/radio, which the prototype also
leaves to
accent-color).This PR addresses host rant 2026-09-11T22:01:43 — "UI 重设计遗漏:全站缺「全局 reset 层」,导致 26 个裸表单控件裸露浏览器默认样式(登录页/共享管理/设置最明显)".
Related Issue
No issue — driven by the host rant
2026-09-11T22:01:43+08:00(projectaitokenpool), per CONTRIBUTING.md §开发流程 ("EMRG 自动实现 → 本地测试全绿 → 提交 PR(引用 rant 时间戳)").Changes
ui/css/style.cssimg, svg { display:block; max-width:100% },a { color:inherit; text-decoration:none },button { font:inherit; cursor:pointer; border:0; background:none; color:inherit },input, select, textarea { font:inherit },p { text-wrap:pretty },h1,h2,h3 { text-wrap:balance }.These are element selectors, so their specificity stays below the existing
.btn/.inputclass rules and already-styled components are unaffected(verified, see Tests).
The prototype's
:focus-visibleline is not duplicated — the impl alreadyhas an equivalent rule; the comment on site records that decision.
.num { font-family: var(--mono); font-variant-numeric: tabular-nums }.Only
.table .numexisted, so.numoutside a table (#wallet-forever,#tx-count) had lost its mono/tabular alignment — that is why the gap wasnever noticed.
.row { display:flex; align-items:center; gap:10px; flex-wrap:wrap }.The markup already used
class="row"in 6 button rows (共享上架 / 充值 /申请加额) and the class had no rule at all — buttons sat edge to edge and
did not wrap.
.divider(the prototype's own class name) as a shared rule with thehistorical
.login-divideralias, and lift.avatarout of the.user-chip .avatardescendant selector..btn(min-height:40px; padding:0 16px; font-size:13.5px; inline-flex; gap:7px),.btn-sm(32px/0 11px) and.input(
padding:10px 12px; font-size:13.5px) with the prototype.border/backgroundout explicitly: those two buttonsdeliberately carry no
.btnclass (they are tabs, not buttons), so they werethe ones rendering the native 3D border.
ui/index.htmlclass="input"to the 12 login / register / verify / forgot inputs(consistent with the other 47 already-classed inputs across the site, and the
approach the rant itself recommends).
login-divider→divider(both are supported; theprototype name is used going forward).
?v=20260911-3→?v=20260911-4(5 refs).Note on scope: the rant's per-view inventory (e.g. "8 裸控件 in view-sharing")
does not match the actual markup — those inputs already had
class="input"atHEAD. The accurate count is 27 classless controls, of which 12 are text-ish
and all 12 are on the login/register/verify/forgot family; that is the set
fixed here. The one cosmetic drift the rant also flagged (
.avatardisplaygridin the prototype vsflexin the impl) is left as is deliberately, toavoid changing the sidebar user card's layout in a reset-layer PR.
Tests
cargo test全部通过 — 148 passed; 0 failedcargo fmt --check通过cargo clippy --all-targets— no warningsis verified by measurable probes:
Checklist
fix/global-reset-layerfix(ui): add the global reset layer and align form/button geometry with the prototypemain