Files
wordpress-theme-aksrt/assets/css/frontend/header-userbox.css
T
kate522 7e7bf6db23 fix(frontend): restore reference VIP watermark and action-row geometry
会员条右下角那枚淡淡的 gem 水印一直没渲染出来:.payvip-icon:before 留着参考主题的 FA4 码位 f219,但本站字体栈是 FA5,该码位在 FA5 里映射不到任何字形。改为 f3a5(fa-gem,Solid 字重),这正是参考主题水印的实际内容。

操作行(用户中心 / 我的订单 / 支付中心 / 后台管理)的几何被 header-userbox.css 里的自有规则盖住了,而 main.css 里本就有参考主题的对应规则:瓦片被强制成 flex 1 1 0 加 min-width 0,容器加 4px  gap,标签还被截断。删掉这些覆盖,只保留 max-height none 这一处对全局导航链接 50px 高度上限的豁免,让 .header-user-href > a(inline-block、padding-top 10px、min-width 58px)和 .header-user-href .toggle-radius(36px)重新接管。

同时删掉 360px 断点下把图标瓦片缩到 34px 的规则,参考主题没有对应物;移动端宽度对齐参考主题的 auto。

排查中确认 main.css 整体是对参考主题的忠实移植:93 条布局工具类、8 条 padding 工具类、.sub-user-box / .header-user-href / .msg-news-icon / .payvip-icon 规则以及颜色变量均逐条一致,因此上述两处就是仅有的缺口。另外核对 f3a5 在随包 FA5 Solid 字体中可解析,fa-solid-900.woff2 确实存在。

重建 main.min.css 与 public bundle,仅这三个构建产物发生变化,JS bundle 字节级一致。573 项契约测试全部通过。
2026-10-10 16:37:01 +08:00

208 lines
4.5 KiB
CSS

/**
* Header account popover.
*
* The shared legacy navigation styles provide the popover shell, and every
* account row (avatar, VIP bar, check-in, wallet tiles, stats badges) renders
* through the reference legacy classes. This module only owns the navigation
* shell anchoring plus the account action-row geometry.
*/
/* The desktop action cluster owns one horizontal alignment context. */
.navbar-top .aksrt-navbar-actions {
display: flex;
align-items: center;
gap: 10px;
min-height: 50px;
margin-top: 0;
margin-bottom: 0;
padding: 0;
}
.navbar-top .aksrt-navbar-actions > *,
.navbar-top .aksrt-navbar-account,
.navbar-top .aksrt-navbar-account > li {
display: inline-flex;
align-items: center;
flex: 0 0 auto;
}
.navbar-top .aksrt-navbar-account > li {
position: relative;
padding: 0;
overflow: visible;
}
.navbar-top .aksrt-navbar-account > li > .sub-menu {
top: calc(100% + 5px);
right: 0;
left: auto;
z-index: 1002;
margin: 0;
}
.navbar-top .aksrt-navbar-account {
gap: 4px;
min-height: 50px;
margin: 0;
}
.navbar-top .aksrt-navbar-account.navbar-text {
float: none;
}
.navbar-top .aksrt-navbar-actions .navbar-cta {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 4px;
min-height: 29px;
margin: 0;
padding: .3em 1em !important;
border-radius: var(--radius-btn, 4px);
font-size: .8em;
line-height: 1.44;
}
.navbar-top .aksrt-navbar-actions .navbar-cta.radius {
border-radius: 50px;
}
.navbar-top .aksrt-navbar-actions .navbar-cta > .icon {
width: 1.2em;
height: 1.2em;
flex: 0 0 auto;
}
.navbar-top .aksrt-nav-icon,
.navbar-top .aksrt-nav-avatar {
display: inline-flex !important;
align-items: center;
justify-content: center;
width: 34px;
height: 34px;
padding: 0 !important;
overflow: visible !important;
border: 0 !important;
border-radius: 0;
background: transparent !important;
box-shadow: none !important;
}
.navbar-top .aksrt-nav-icon .icon {
width: 1.2em;
height: 1.2em;
}
.navbar-top .aksrt-nav-avatar {
margin-top: 0;
}
.navbar-top .aksrt-nav-avatar .avatar {
display: block;
width: 29px;
height: 29px;
border-radius: 50%;
object-fit: cover;
}
.navbar-top .aksrt-navbar-actions .toggle-radius {
flex: 0 0 29px;
margin: 0;
vertical-align: middle;
}
.navbar-top .aksrt-navbar-language {
margin: 0;
}
/* Anchor the VIP preview to the full navigation row instead of relying on
* the absolute panel's static position beside the compact CTA. */
.navbar-top .aksrt-navbar-actions .navbar-vip-hover {
position: relative;
align-self: stretch;
align-items: center;
overflow: visible;
}
.navbar-top .aksrt-navbar-actions .navbar-vip-hover > .sub-vip-card {
top: 100%;
right: 0;
left: auto;
width: max-content;
max-width: calc(100vw - 24px);
margin: 0;
z-index: 1002;
}
/* Keep the drop-down search panel above a fixed header (z-index: 999). */
.navbar-search {
z-index: 1001;
opacity: 0;
transform: translate3d(0, -24px, 0);
transition: transform .24s ease, opacity .18s ease, visibility 0s linear .24s;
will-change: transform, opacity;
}
.navbar-search.show {
opacity: 1;
transform: translate3d(0, 0, 0);
transition-delay: 0s;
}
.navbar-search .line-form-input:focus,
.navbar-search .line-form-input:focus-visible {
outline: 0;
box-shadow: none;
}
.navbar-search .search-close-box {
display: flex;
justify-content: flex-end;
max-width: 660px;
margin: 16px auto 0;
}
.navbar-search .search-close-box > .but {
float: none;
}
.aksrt-header-userbox {
color: var(--color-ink-2);
}
/* Top-nav bell badge (the card itself uses the legacy badge.top element). */
.aksrt-nav-notification .aksrt-notification-badge {
position: absolute;
top: 2px;
right: 2px;
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 16px;
height: 16px;
padding: 0 4px;
border: 2px solid var(--surface-1);
border-radius: 999px;
background: #e74c3c;
color: #fff;
font-size: 9px;
font-weight: 700;
line-height: 1;
}
/* Navigation links are globally capped at 50px. Account actions are taller
* icon tiles and must opt out or their labels overlap the following row.
* The tile geometry itself stays with the shared legacy rules
* (.header-user-href > a and .header-user-href .toggle-radius in main.css)
* so the action row keeps the reference proportions. */
.navbar-top .aksrt-header-userbox .header-user-href > a,
.aksrt-header-userbox .header-user-href > a {
max-height: none;
}
.mobile-navbar .aksrt-header-userbox {
width: auto;
max-width: 400px;
margin: auto;
}