diff --git a/assets/css/routes/user-center/shell.css b/assets/css/routes/user-center/shell.css index 34b825fa..2d345018 100644 --- a/assets/css/routes/user-center/shell.css +++ b/assets/css/routes/user-center/shell.css @@ -12,12 +12,20 @@ /* ==================== 用户中心容器 ==================== */ /* 主内容宽度由 frontend/layout.css 的 profile shell 合同统一管理。 */ .aksrt-profile.content-shell { + display: block; width: 100%; max-width: none; padding: 0 0 40px; box-sizing: border-box; } +/* main 仍带 legacy .user-center 类;旧规则会把整页误设为 flex,并以 + * gap:20px 挤窄第一个 flex 子项(顶部资料卡所在的 content-wrap)。 */ +.aksrt-profile.user-center { + display: block; + gap: 0; +} + /* 顶部资料卡位于双栏布局之前,必须与用户中心外壳同宽,不能继续继承 * legacy .content-wrap / .container 的收窄规则。 */ .aksrt-profile.content-shell > .content-wrap, diff --git a/tests/widget-system/post-visual-contract.test.cjs b/tests/widget-system/post-visual-contract.test.cjs index b5243fda..9503c024 100644 --- a/tests/widget-system/post-visual-contract.test.cjs +++ b/tests/widget-system/post-visual-contract.test.cjs @@ -466,6 +466,7 @@ test('profile routes load versioned leaf styles and keep dialogs hidden initiall assert.doesNotMatch(profileLayoutCss, /\.aksrt-profile\.content-shell\s*,[\s\S]*?max-width:\s*var\(--container/); assert.doesNotMatch(userCenterShellCss, /\.aksrt-user-center \.content-shell\s*,[\s\S]*?max-width:\s*var\(--container/); assert.match(userCenterShellCss, /\.aksrt-profile\.content-shell\s*\{[\s\S]*?max-width:\s*none/); + assert.match(userCenterShellCss, /\.aksrt-profile\.user-center\s*\{[\s\S]*?display:\s*block;[\s\S]*?gap:\s*0/); assert.match(userCenterShellCss, /\.aksrt-profile\.content-shell > \.content-wrap,[\s\S]*?\.aksrt-profile\.content-shell \.uc-header\s*\{[\s\S]*?width:\s*100%;[\s\S]*?max-width:\s*none/); assert.match(profileLayoutCss, /\.aksrt-cover-menu__panel\[hidden\]\s*\{\s*display:\s*none\s*!important;\s*\}/); assert.match(profileLayoutCss, /#aksrt-bg-file-input\[hidden\],[\s\S]*?#aksrt-avatar-file-input\[hidden\][\s\S]*?display:\s*none\s*!important;/);