fix(nav): complete zibll top-bar text/icon alignment pass
Rewrite inline nav.css alignment for logo, menu titles, CTA chips, theme toggle (29px), icon-only buttons, and user-href badges so FA glyphs and labels share zibll baselines.
This commit is contained in:
1 parent
683506f3a2
commit
4f5430cdba
1 file changed
+243
-138
+243
-138
@@ -9,128 +9,47 @@
|
|||||||
@import url("nav/header-userbox.css");
|
@import url("nav/header-userbox.css");
|
||||||
@import url("nav/dark-mode-submenu.css");
|
@import url("nav/dark-mode-submenu.css");
|
||||||
|
|
||||||
/* === Inline critical nav icon/text alignment (bypass @import cache) === */
|
/* ==========================================================================
|
||||||
/* zibll toggle-radius icon center */
|
* Top navbar icon/text alignment — 1:1 zibll (demo.zibll.com / main.css)
|
||||||
.navbar-top .toggle-radius,
|
* Kept INLINE in the aggregator so browsers cannot miss it via stale @import.
|
||||||
.navbar-top a.toggle-theme.toggle-radius,
|
* ========================================================================== */
|
||||||
.navbar-but-cluster .toggle-theme {
|
|
||||||
position: relative;
|
/* --- Shell row --- */
|
||||||
width: 29px;
|
.navbar-top {
|
||||||
height: 29px;
|
margin: 0;
|
||||||
display: inline-block;
|
border-radius: 0 !important;
|
||||||
overflow: hidden;
|
font-size: 15px;
|
||||||
vertical-align: middle;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
}
|
||||||
.navbar-top .toggle-radius > i,
|
.navbar-top .navbar-form,
|
||||||
.navbar-top .toggle-radius .fa,
|
.navbar-top .navbar-right,
|
||||||
.navbar-top .toggle-radius .fas,
|
.navbar-top .navbar-form.flex.ac {
|
||||||
.navbar-top .toggle-theme > i {
|
display: flex !important;
|
||||||
position: absolute !important;
|
align-items: center !important;
|
||||||
top: 50% !important;
|
margin-top: 0;
|
||||||
left: 0 !important;
|
margin-bottom: 0;
|
||||||
right: 0 !important;
|
}
|
||||||
margin: auto !important;
|
.navbar-top .list-inline {
|
||||||
transform: translateY(-50%) !important;
|
display: flex;
|
||||||
line-height: 1 !important;
|
|
||||||
width: 1em;
|
|
||||||
height: 1em;
|
|
||||||
display: inline-flex !important;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
margin: 0;
|
||||||
text-align: center;
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
.navbar-top .list-inline > li {
|
||||||
/* Icon-only .btn chips (user / search) */
|
display: flex;
|
||||||
.navbar-top .list-inline > li > a.btn,
|
|
||||||
.navbar-top a.btn.signin-loader,
|
|
||||||
.navbar-top a.btn.nav-search-btn,
|
|
||||||
.navbar-top a.btn.main-search-btn {
|
|
||||||
display: inline-flex !important;
|
|
||||||
align-items: center !important;
|
|
||||||
justify-content: center !important;
|
|
||||||
width: 36px !important;
|
|
||||||
height: 36px !important;
|
|
||||||
min-height: 36px !important;
|
|
||||||
padding: 0 !important;
|
|
||||||
gap: 0 !important;
|
|
||||||
line-height: 1 !important;
|
|
||||||
box-sizing: border-box;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
.navbar-top .list-inline > li > a.btn > i,
|
|
||||||
.navbar-top a.btn.signin-loader > i,
|
|
||||||
.navbar-top a.btn.nav-search-btn > i,
|
|
||||||
.navbar-top a.btn.main-search-btn > i {
|
|
||||||
margin: 0 !important;
|
|
||||||
line-height: 1 !important;
|
|
||||||
position: static !important;
|
|
||||||
transform: none !important;
|
|
||||||
top: auto !important;
|
|
||||||
width: 1em;
|
|
||||||
height: 1em;
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
margin: 0;
|
||||||
}
|
|
||||||
|
|
||||||
/* CTA icon + label baseline */
|
|
||||||
.navbar-top a.navbar-cta.but,
|
|
||||||
.navbar-top .navbar-but .but {
|
|
||||||
display: inline-flex !important;
|
|
||||||
align-items: center !important;
|
|
||||||
justify-content: center !important;
|
|
||||||
line-height: 1 !important;
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
.navbar-top a.navbar-cta.but > i,
|
.navbar-top .list-inline.splitters > li + li {
|
||||||
.navbar-top .navbar-but .but > i {
|
margin-left: 6px;
|
||||||
margin: 0 0.25em 0 0 !important;
|
|
||||||
line-height: 1 !important;
|
|
||||||
position: static !important;
|
|
||||||
transform: none !important;
|
|
||||||
top: auto !important;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
.navbar-top a.navbar-cta.but > .navbar-cta-text,
|
|
||||||
.navbar-top .navbar-but .but > .navbar-cta-text {
|
|
||||||
line-height: 1.2;
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Menu text baseline */
|
/* --- Logo --- */
|
||||||
.navbar-top .nav > li > a {
|
|
||||||
display: inline-flex !important;
|
|
||||||
align-items: center !important;
|
|
||||||
line-height: 1.44;
|
|
||||||
}
|
|
||||||
.navbar-top .nav > li > a > .menu-item-title {
|
|
||||||
line-height: 1.44;
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
.navbar-top .nav > li > a > .menu-item-icon,
|
|
||||||
.navbar-top .nav > li > a > i.menu-item-icon {
|
|
||||||
margin-right: 0.25em;
|
|
||||||
line-height: 1 !important;
|
|
||||||
position: static !important;
|
|
||||||
transform: none !important;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FA baseline in bar */
|
|
||||||
.navbar-top .fa,
|
|
||||||
.navbar-top .fas,
|
|
||||||
.navbar-top .far,
|
|
||||||
.navbar-top .fab {
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Logo */
|
|
||||||
.navbar-top .navbar-brand {
|
.navbar-top .navbar-brand {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
padding: 7px 10px;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
.navbar-logo {
|
.navbar-logo {
|
||||||
@@ -141,23 +60,205 @@
|
|||||||
.navbar-logo > img {
|
.navbar-logo > img {
|
||||||
display: block;
|
display: block;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
|
padding: 0 30px;
|
||||||
|
width: auto;
|
||||||
|
max-height: 36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Right clusters vertical center */
|
/* --- Primary menu text/icons --- */
|
||||||
.navbar-top .navbar-form,
|
.navbar-top .nav > li > a {
|
||||||
.navbar-top .navbar-right {
|
padding-left: 10px;
|
||||||
display: flex;
|
padding-right: 10px;
|
||||||
|
border-radius: 4px;
|
||||||
|
display: inline-flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
overflow: hidden;
|
||||||
|
line-height: 1.44;
|
||||||
|
}
|
||||||
|
.navbar-top .nav > li > a > .menu-item-title {
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
line-height: 1.44;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.navbar-top .nav > li > a > .menu-item-icon,
|
||||||
|
.navbar-top .nav > li > a > i.menu-item-icon,
|
||||||
|
.navbar-top .nav > li > a > .fa.menu-item-icon,
|
||||||
|
.navbar-top .nav > li > a > .fas.menu-item-icon {
|
||||||
|
margin-right: 0.25em !important;
|
||||||
|
margin-left: 0 !important;
|
||||||
|
line-height: 1 !important;
|
||||||
|
position: static !important;
|
||||||
|
transform: none !important;
|
||||||
|
top: auto !important;
|
||||||
|
flex-shrink: 0;
|
||||||
|
vertical-align: 0 !important;
|
||||||
|
}
|
||||||
|
.navbar-top .nav > li > a > .fa-angle-down {
|
||||||
|
margin-left: 0.2em;
|
||||||
|
margin-right: 0 !important;
|
||||||
|
line-height: 1;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.navbar-nav li a,
|
||||||
|
.navbar-nav li {
|
||||||
|
max-height: 50px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- CTA (发布 / 会员): icon + label --- */
|
||||||
|
.navbar-top .navbar-but .but,
|
||||||
|
.navbar-top a.navbar-cta.but {
|
||||||
|
font-size: 0.8em;
|
||||||
|
padding: 0.3em 1em !important;
|
||||||
|
margin: 0.4em;
|
||||||
|
display: inline-flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
justify-content: center !important;
|
||||||
|
line-height: 1.44 !important;
|
||||||
|
vertical-align: middle;
|
||||||
|
box-sizing: border-box;
|
||||||
|
gap: 0;
|
||||||
|
}
|
||||||
|
.navbar-top .navbar-but .but > i,
|
||||||
|
.navbar-top a.navbar-cta.but > i,
|
||||||
|
.navbar-top .navbar-but .but > .fa,
|
||||||
|
.navbar-top .navbar-but .but > .fas,
|
||||||
|
.navbar-top a.navbar-cta.but > .fa,
|
||||||
|
.navbar-top a.navbar-cta.but > .fas {
|
||||||
|
margin: 0 0.25em 0 0 !important;
|
||||||
|
line-height: 1 !important;
|
||||||
|
position: static !important;
|
||||||
|
transform: none !important;
|
||||||
|
top: auto !important;
|
||||||
|
flex-shrink: 0;
|
||||||
|
vertical-align: 0 !important;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.navbar-top .navbar-but .but > .navbar-cta-text,
|
||||||
|
.navbar-top a.navbar-cta.but > .navbar-cta-text {
|
||||||
|
line-height: 1.44;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- Icon-only .btn chips (user / search) --- */
|
||||||
|
.navbar-top .list-inline > li > a.btn,
|
||||||
|
.navbar-top a.btn.signin-loader,
|
||||||
|
.navbar-top a.btn.nav-search-btn,
|
||||||
|
.navbar-top a.btn.main-search-btn {
|
||||||
|
display: inline-flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
justify-content: center !important;
|
||||||
|
width: 36px !important;
|
||||||
|
height: 36px !important;
|
||||||
|
min-width: 36px !important;
|
||||||
|
min-height: 36px !important;
|
||||||
|
max-height: 36px !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
gap: 0 !important;
|
||||||
|
line-height: 1 !important;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
vertical-align: middle;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.navbar-top .list-inline > li > a.btn > i,
|
||||||
|
.navbar-top a.btn.signin-loader > i,
|
||||||
|
.navbar-top a.btn.nav-search-btn > i,
|
||||||
|
.navbar-top a.btn.main-search-btn > i {
|
||||||
|
margin: 0 !important;
|
||||||
|
line-height: 1 !important;
|
||||||
|
position: static !important;
|
||||||
|
transform: none !important;
|
||||||
|
top: auto !important;
|
||||||
|
left: auto !important;
|
||||||
|
right: auto !important;
|
||||||
|
width: 1em;
|
||||||
|
height: 1em;
|
||||||
|
display: inline-flex !important;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
vertical-align: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dropdown / user-href circular icon badges (zibll header-user-href) */
|
/* Avatar trigger */
|
||||||
|
.navbar-top a.navbar-avatar {
|
||||||
|
display: inline-flex !important;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
padding: 0 !important;
|
||||||
|
line-height: 0;
|
||||||
|
}
|
||||||
|
.navbar-top a.navbar-avatar img,
|
||||||
|
.navbar-top a.navbar-avatar .avatar {
|
||||||
|
width: 32px !important;
|
||||||
|
height: 32px !important;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: block;
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- Theme toggle (zibll toggle-radius 29px) --- */
|
||||||
|
.navbar-top a.toggle-theme.toggle-radius,
|
||||||
|
.navbar-top .toggle-theme.toggle-radius,
|
||||||
|
.navbar-but-cluster .toggle-theme {
|
||||||
|
position: relative !important;
|
||||||
|
width: 29px !important;
|
||||||
|
height: 29px !important;
|
||||||
|
min-width: 29px !important;
|
||||||
|
min-height: 29px !important;
|
||||||
|
display: inline-block !important;
|
||||||
|
overflow: hidden !important;
|
||||||
|
vertical-align: middle;
|
||||||
|
border-radius: 100% !important;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0 !important;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
.navbar-top a.toggle-theme.toggle-radius > i,
|
||||||
|
.navbar-top .toggle-theme.toggle-radius > i,
|
||||||
|
.navbar-top a.toggle-theme.toggle-radius .fa,
|
||||||
|
.navbar-top a.toggle-theme.toggle-radius .fas {
|
||||||
|
position: absolute !important;
|
||||||
|
top: 50% !important;
|
||||||
|
left: 0 !important;
|
||||||
|
right: 0 !important;
|
||||||
|
margin: auto !important;
|
||||||
|
transform: translateY(-50%) !important;
|
||||||
|
line-height: 1 !important;
|
||||||
|
width: 1em !important;
|
||||||
|
height: 1em !important;
|
||||||
|
display: inline-flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
justify-content: center !important;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: 0 !important;
|
||||||
|
}
|
||||||
|
/* Only one glyph visible */
|
||||||
|
.navbar-top .toggle-theme .theme-icon-sun[style*="display:none"],
|
||||||
|
.navbar-top .toggle-theme .theme-icon-moon[style*="display:none"] {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- Dropdown circular badges (header-user-href) keep 36px --- */
|
||||||
.navbar-top .header-user-href .toggle-radius,
|
.navbar-top .header-user-href .toggle-radius,
|
||||||
.navbar-top .badg.toggle-radius {
|
.navbar-top .badg.toggle-radius {
|
||||||
position: relative;
|
position: relative !important;
|
||||||
display: inline-block;
|
width: 36px !important;
|
||||||
|
height: 36px !important;
|
||||||
|
display: inline-block !important;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
border-radius: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.navbar-top .header-user-href .toggle-radius > i,
|
.navbar-top .header-user-href .toggle-radius > i,
|
||||||
.navbar-top .header-user-href .toggle-radius .fa,
|
.navbar-top .header-user-href .toggle-radius .fa,
|
||||||
@@ -177,30 +278,34 @@
|
|||||||
display: inline-flex !important;
|
display: inline-flex !important;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
|
||||||
|
|
||||||
/* Kill FA vertical-align drift inside flex chips */
|
|
||||||
.navbar-top a.btn > i.fas,
|
|
||||||
.navbar-top a.btn > i.far,
|
|
||||||
.navbar-top a.navbar-cta > i.fas,
|
|
||||||
.navbar-top a.navbar-cta > i.far,
|
|
||||||
.navbar-top .toggle-theme > i.fas {
|
|
||||||
vertical-align: 0 !important;
|
vertical-align: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Navbar form row height consistency */
|
/* --- FA general --- */
|
||||||
.navbar-top .navbar-form.flex.ac {
|
.navbar-top .fa,
|
||||||
min-height: 36px;
|
.navbar-top .fas,
|
||||||
|
.navbar-top .far,
|
||||||
|
.navbar-top .fab {
|
||||||
|
line-height: 1;
|
||||||
|
transition: 0.2s;
|
||||||
}
|
}
|
||||||
.navbar-top .list-inline {
|
.navbar-top .css-icon {
|
||||||
display: flex;
|
width: 1em;
|
||||||
|
height: 1em;
|
||||||
|
vertical-align: -0.15em;
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fold / bars but in mid widths */
|
||||||
|
.navbar-top .show-nav-but .but {
|
||||||
|
display: inline-flex !important;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 0;
|
justify-content: center;
|
||||||
padding: 0;
|
line-height: 1;
|
||||||
list-style: none;
|
padding: 0.3em 0.6em !important;
|
||||||
}
|
}
|
||||||
.navbar-top .list-inline > li {
|
.navbar-top .show-nav-but .but > i {
|
||||||
display: flex;
|
margin: 0 !important;
|
||||||
align-items: center;
|
line-height: 1 !important;
|
||||||
vertical-align: middle;
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user