fix(nav): align header bar height with zibll main.css
Drop forced 34px CTA chips and container min-height:50 that inflated or shrank the bar vs zibll. Restore .navbar-but .but to 0.8em / 0.3em 1em / margin 0.4em; keep logo 36px, header pad 8px 20px, fixed reserve 88px.
This commit is contained in:
+50
-82
@@ -108,10 +108,11 @@
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* --- CTA (发布 / 会员): fixed chip size (matches header-menu-buttons 34px) ---
|
||||
* Live markup is NOT inside .navbar-but-cluster — it's
|
||||
* .navbar-form.navbar-but > a.but.navbar-cta / .navbar-vip > a.payvip-icon.
|
||||
* Do not use height:auto or em vertical padding here (causes grow on press).
|
||||
/*
|
||||
* CTA (发布 / 会员) — zibll main.css .navbar-top .navbar-but .but
|
||||
* font-size 0.8em; padding 0.3em 1em; margin 0.4em; line-height 1.44
|
||||
* Live markup: .navbar-form.navbar-but > a.but.navbar-cta (no cluster wrapper).
|
||||
* Lock the SAME metrics on :active so ripple/focus cannot stretch the chip.
|
||||
*/
|
||||
.navbar-top .navbar-but .but,
|
||||
.navbar-top .navbar-but a.but,
|
||||
@@ -120,19 +121,19 @@
|
||||
.navbar-top a.navbar-newposts.navbar-cta,
|
||||
.navbar-top a.payvip-icon.navbar-cta,
|
||||
.navbar-top .navbar-vip a.navbar-cta {
|
||||
font-size: 13px !important;
|
||||
padding: 0 14px !important;
|
||||
margin: 0 4px !important;
|
||||
font-size: 0.8em !important;
|
||||
padding: 0.3em 1em !important;
|
||||
margin: 0.4em !important;
|
||||
display: inline-flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
line-height: 1 !important;
|
||||
line-height: 1.44 !important;
|
||||
vertical-align: middle;
|
||||
box-sizing: border-box !important;
|
||||
gap: 6px !important;
|
||||
height: 34px !important;
|
||||
min-height: 34px !important;
|
||||
max-height: 34px !important;
|
||||
gap: 0.25em;
|
||||
height: auto !important;
|
||||
min-height: 0 !important;
|
||||
max-height: 50px !important; /* zibll .navbar-nav li max-height */
|
||||
width: fit-content !important;
|
||||
max-width: fit-content !important;
|
||||
min-width: 0 !important;
|
||||
@@ -149,7 +150,7 @@
|
||||
.navbar-top a.newadd-btns.navbar-cta > i,
|
||||
.navbar-top a.navbar-newposts.navbar-cta > i,
|
||||
.navbar-top a.payvip-icon.navbar-cta > i {
|
||||
margin: 0 !important;
|
||||
margin: 0 0.25em 0 0 !important;
|
||||
line-height: 1 !important;
|
||||
position: static !important;
|
||||
transform: none !important;
|
||||
@@ -157,16 +158,18 @@
|
||||
flex-shrink: 0;
|
||||
vertical-align: 0 !important;
|
||||
display: inline-block;
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
font-size: 1em;
|
||||
}
|
||||
.navbar-top .navbar-but .but > i:last-child,
|
||||
.navbar-top a.navbar-cta.but > i:only-child,
|
||||
.navbar-top a.newadd-btns.navbar-cta > i:only-child {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
.navbar-top .navbar-but .but > .navbar-cta-text,
|
||||
.navbar-top a.navbar-cta.but > .navbar-cta-text,
|
||||
.navbar-top a.newadd-btns.navbar-cta > .navbar-cta-text,
|
||||
.navbar-top a.navbar-newposts.navbar-cta > .navbar-cta-text,
|
||||
.navbar-top a.payvip-icon.navbar-cta > .navbar-cta-text {
|
||||
line-height: 1 !important;
|
||||
line-height: 1.44 !important;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
@@ -364,45 +367,6 @@ body.dark-theme .navbar-but-cluster .toggle-theme .theme-icon-sun {
|
||||
}
|
||||
|
||||
|
||||
/* Direct single-type publish / VIP CTA — lock chip box (no height:auto growth) */
|
||||
.navbar-top a.newadd-btns.navbar-cta,
|
||||
.navbar-top a.navbar-newposts.navbar-cta,
|
||||
.navbar-top a.payvip-icon.navbar-cta,
|
||||
.navbar-top .navbar-but .but.navbar-cta,
|
||||
.navbar-top .navbar-vip a.navbar-cta {
|
||||
display: inline-flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
line-height: 1 !important;
|
||||
height: 34px !important;
|
||||
min-height: 34px !important;
|
||||
max-height: 34px !important;
|
||||
padding: 0 14px !important;
|
||||
margin: 0 4px !important;
|
||||
width: fit-content !important;
|
||||
max-width: fit-content !important;
|
||||
white-space: nowrap;
|
||||
box-sizing: border-box !important;
|
||||
transform: none !important;
|
||||
}
|
||||
.navbar-top a.newadd-btns.navbar-cta > i,
|
||||
.navbar-top a.navbar-newposts.navbar-cta > i,
|
||||
.navbar-top a.payvip-icon.navbar-cta > i {
|
||||
margin: 0 !important;
|
||||
line-height: 1 !important;
|
||||
position: static !important;
|
||||
transform: none !important;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.navbar-top a.newadd-btns.navbar-cta > .navbar-cta-text,
|
||||
.navbar-top a.navbar-newposts.navbar-cta > .navbar-cta-text,
|
||||
.navbar-top a.payvip-icon.navbar-cta > .navbar-cta-text {
|
||||
line-height: 1 !important;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
/* Final FA baseline: never vertical-align in the top bar (flex/abs centering only). */
|
||||
.navbar-top .fa,
|
||||
.navbar-top .fas,
|
||||
@@ -413,25 +377,28 @@ body.dark-theme .navbar-but-cluster .toggle-theme .theme-icon-sun {
|
||||
vertical-align: 0 !important;
|
||||
}
|
||||
|
||||
/* Keep every right-side control row on the same optical midline as the brand. */
|
||||
/*
|
||||
* Header row height — 1:1 zibll (demo.zibll.com / main.css)
|
||||
* Natural stack: .header padding 8px 20px + brand pad 7px + logo 36px
|
||||
* → content row ~50px, bar ~66px. Senior submenu top: 59px. Fixed reserve 88px.
|
||||
* Do NOT force min-height:50 on the flex row (over-tall vs zibll).
|
||||
*/
|
||||
.navbar-top .container-header {
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
min-height: 50px;
|
||||
min-height: 0;
|
||||
height: auto;
|
||||
}
|
||||
.navbar-top .navbar-form,
|
||||
.navbar-top .navbar-right,
|
||||
.navbar-top .navbar-header {
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
min-height: 36px;
|
||||
min-height: 0;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* Kill fluid min-height / radius em-padding that made chips grow on press */
|
||||
.navbar-top a.navbar-cta.but,
|
||||
.navbar-top .navbar-but .but,
|
||||
.navbar-top a.newadd-btns.navbar-cta,
|
||||
.navbar-top a.payvip-icon.navbar-cta,
|
||||
/* Hover/active: same box as rest (prevent press stretch; ripple is absolute) */
|
||||
.navbar-top a.navbar-cta.but:hover,
|
||||
.navbar-top a.navbar-cta.but:focus,
|
||||
.navbar-top a.navbar-cta.but:focus-visible,
|
||||
@@ -448,27 +415,26 @@ body.dark-theme .navbar-but-cluster .toggle-theme .theme-icon-sun {
|
||||
.navbar-top a.payvip-icon.navbar-cta:focus,
|
||||
.navbar-top a.payvip-icon.navbar-cta:focus-visible,
|
||||
.navbar-top a.payvip-icon.navbar-cta:active {
|
||||
height: 34px !important;
|
||||
min-height: 34px !important;
|
||||
max-height: 34px !important;
|
||||
padding: 0 14px !important;
|
||||
margin: 0 4px !important;
|
||||
line-height: 1 !important;
|
||||
font-size: 13px !important;
|
||||
font-size: 0.8em !important;
|
||||
padding: 0.3em 1em !important;
|
||||
margin: 0.4em !important;
|
||||
line-height: 1.44 !important;
|
||||
height: auto !important;
|
||||
min-height: 0 !important;
|
||||
max-height: 50px !important;
|
||||
width: fit-content !important;
|
||||
max-width: fit-content !important;
|
||||
box-sizing: border-box !important;
|
||||
transform: none !important;
|
||||
/* .but:active inset shadow only — no layout change */
|
||||
box-shadow: none !important;
|
||||
}
|
||||
/* radius modifier from buttons.css sets padding: 0.3em 1em — override */
|
||||
|
||||
/* .but.radius in buttons.css also uses 0.3em 1em — keep zibll metrics + pill radius */
|
||||
.navbar-top a.but.radius.navbar-cta,
|
||||
.navbar-top a.navbar-cta.radius,
|
||||
.navbar-top a.newadd-btns.radius,
|
||||
.navbar-top a.payvip-icon.radius {
|
||||
padding: 0 14px !important;
|
||||
border-radius: var(--navbar-cta-radius, 20px) !important;
|
||||
padding: 0.3em 1em !important;
|
||||
border-radius: var(--navbar-cta-radius, 50px) !important;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
@@ -508,18 +474,20 @@ body.dark-theme .navbar-but-cluster .toggle-theme .theme-icon-sun {
|
||||
.navbar-top .navbar-toggle:active {
|
||||
transform: none !important;
|
||||
}
|
||||
/* Keep CTA chip geometry stable on press (no height/padding jump) */
|
||||
/* Keep CTA geometry stable on press — same zibll metrics, no stretch */
|
||||
.navbar-top .navbar-but .but:hover,
|
||||
.navbar-top .navbar-but .but:focus,
|
||||
.navbar-top .navbar-but .but:active,
|
||||
.navbar-top a.navbar-cta.but:hover,
|
||||
.navbar-top a.navbar-cta.but:focus,
|
||||
.navbar-top a.navbar-cta.but:active {
|
||||
margin: 0 4px !important;
|
||||
padding: 0 14px !important;
|
||||
height: 34px !important;
|
||||
min-height: 34px !important;
|
||||
max-height: 34px !important;
|
||||
margin: 0.4em !important;
|
||||
padding: 0.3em 1em !important;
|
||||
height: auto !important;
|
||||
min-height: 0 !important;
|
||||
max-height: 50px !important;
|
||||
font-size: 0.8em !important;
|
||||
line-height: 1.44 !important;
|
||||
box-sizing: border-box !important;
|
||||
transform: none !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user