From f49217429799843da78893af7d643c49d46cb9cb Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 24 Jul 2026 12:08:09 +0800 Subject: [PATCH 1/7] fix(nav): align navbar text and icon baselines with zibll Center FA icons in toggle-radius/btn chips, restore menu-item title flex baseline, and match CTA/logo vertical alignment so top bar text and icons no longer drift. --- assets/css/core/buttons.css | 20 +++- .../css/frontend/nav/header-menu-buttons.css | 45 +++++--- assets/css/frontend/nav/zib-navbar-core.css | 45 +++++++- assets/css/frontend/nav/zib-utilities.css | 103 ++++++++++++++++++ 4 files changed, 197 insertions(+), 16 deletions(-) diff --git a/assets/css/core/buttons.css b/assets/css/core/buttons.css index c0cd3c2c..b5882604 100644 --- a/assets/css/core/buttons.css +++ b/assets/css/core/buttons.css @@ -253,7 +253,7 @@ .active.badg.hollow, .active > .hollow:not(.vip-tag) { --this-color: var(--focus-color); } -/* toggle-radius (round 29px toggle) */ +/* toggle-radius (round 29px toggle) — zibll 1:1 */ .toggle-radius { background: var(--this-bg); width: 29px; @@ -265,8 +265,24 @@ vertical-align: text-top; --this-bg: var(--main-border-color); } +/* zibll groups these with abs-* : absolute + vertical center; then pin left/right 0 */ .toggle-radius .fa, -.toggle-radius .icon { right: 0 !important; left: 0 !important; margin: auto; } +.toggle-radius .icon, +.toggle-radius > i { + position: absolute; + top: 50%; + right: 0 !important; + left: 0 !important; + margin: auto; + transform: translateY(-50%); + line-height: 1; + width: 1em; + height: 1em; + display: inline-flex; + align-items: center; + justify-content: center; + text-align: center; +} /* solid color modifiers — set --this-bg; default --this-color white */ .b-gray, .b-theme, .b-red, .b-yellow, .b-blue, .b-blue-2, .b-black, diff --git a/assets/css/frontend/nav/header-menu-buttons.css b/assets/css/frontend/nav/header-menu-buttons.css index 189b5527..b007f281 100644 --- a/assets/css/frontend/nav/header-menu-buttons.css +++ b/assets/css/frontend/nav/header-menu-buttons.css @@ -611,35 +611,47 @@ body.theme-dark body > .drop-newadd .newadd-btns__item { color: #fff; } -/* Theme toggle */ +/* Theme toggle — zibll toggle-radius (29px) + absolute FA center, not flex+translate(-50%) */ .navbar-but-cluster .theme-toggle-desktop, -.navbar-but-cluster .toggle-theme { - display: inline-flex; - align-items: center; - justify-content: center; - width: 34px; - height: 34px; +.navbar-but-cluster .toggle-theme, +.navbar-top .toggle-theme.toggle-radius { + display: inline-block; + align-items: unset; + justify-content: unset; + width: 29px; + height: 29px; padding: 0; - border-radius: 999px; + border-radius: 100%; flex: 0 0 auto; position: relative; overflow: hidden; + vertical-align: middle; + box-sizing: border-box; } .navbar-but-cluster .theme-toggle-desktop > i, -.navbar-but-cluster .toggle-theme > i { +.navbar-but-cluster .toggle-theme > i, +.navbar-top .toggle-theme.toggle-radius > i { margin: 0 !important; - line-height: 1; + line-height: 1 !important; position: absolute; - left: 50%; + left: 0 !important; + right: 0 !important; top: 50%; - transform: translate(-50%, -50%); + transform: translateY(-50%); + width: 1em; + height: 1em; + text-align: center; + display: inline-flex; + align-items: center; + justify-content: center; } .theme-toggle-desktop, .theme-toggle-mobile, .toggle-theme { position: relative; + overflow: hidden; } .theme-toggle-desktop .theme-icon-moon, @@ -649,11 +661,18 @@ body.theme-dark body > .drop-newadd .newadd-btns__item { .toggle-theme .theme-icon-moon, .toggle-theme .theme-icon-sun { margin: 0 !important; - line-height: 1; + line-height: 1 !important; width: 1em; + height: 1em; text-align: center; } +/* Hide inactive sun/moon without leaving layout shift */ +.toggle-theme .theme-icon-sun[style*="display:none"], +.toggle-theme .theme-icon-moon[style*="display:none"] { + display: none !important; +} + /* float commerce */ .float-btn-shop-cart { position: relative; diff --git a/assets/css/frontend/nav/zib-navbar-core.css b/assets/css/frontend/nav/zib-navbar-core.css index 6ec5c82d..5021895c 100644 --- a/assets/css/frontend/nav/zib-navbar-core.css +++ b/assets/css/frontend/nav/zib-navbar-core.css @@ -296,6 +296,11 @@ badge.top, font-size: 0.8em; padding: 0.3em 1em !important; margin: 0.4em; + display: inline-flex !important; + align-items: center; + justify-content: center; + line-height: 1.44; + vertical-align: middle; } .navbar-top .navbar-but .but.hover-show { @@ -304,11 +309,22 @@ badge.top, .navbar-top .navbar-brand { padding: 7px 10px; + display: flex; + align-items: center; + line-height: 1; +} + +.navbar-logo { + display: inline-flex; + align-items: center; + line-height: 0; } .navbar-logo > img { height: 36px; padding: 0 30px; + display: block; + vertical-align: middle; } .navbar-top .nav > li > a { @@ -318,12 +334,16 @@ badge.top, display: inline-flex !important; overflow: hidden; align-items: center; + 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; } .menu-item > a > .but { @@ -338,8 +358,31 @@ badge.top, color: var(--focus-color); } -.navbar-top .fa { +.navbar-top .fa, +.navbar-top .fas, +.navbar-top .far, +.navbar-top .fab { transition: 0.2s; + line-height: 1; +} + +/* Override AKSRT .btn chrome when used as pure icon hit-targets in the bar */ +.navbar-top a.btn.signin-loader, +.navbar-top a.btn.nav-search-btn, +.navbar-top a.btn.main-search-btn { + height: 36px !important; + width: 36px !important; + min-height: 36px !important; + padding: 0 !important; + gap: 0 !important; + line-height: 1 !important; + border-radius: 4px; + font-size: 16px; +} + +.navbar-top .navbar-form { + display: flex; + align-items: center; } .navbar-collapse .search-input { diff --git a/assets/css/frontend/nav/zib-utilities.css b/assets/css/frontend/nav/zib-utilities.css index 69d9333a..7cc2fc04 100644 --- a/assets/css/frontend/nav/zib-utilities.css +++ b/assets/css/frontend/nav/zib-utilities.css @@ -242,6 +242,109 @@ body.mobile-navbar-show { overflow: hidden; } justify-content: center; width: 36px; height: 36px; + padding: 0 !important; + line-height: 1; + gap: 0; + vertical-align: middle; +} +/* Icon-only nav chips: neutralize .btn padding/height so FA sits dead-center */ +.navbar-top .list-inline > li > a.btn > i, +.navbar-top .list-inline > li > a.btn > .fa, +.navbar-top .list-inline > li > a.btn > .fas, +.navbar-top .list-inline > li > a.btn > .far, +.navbar-top a.btn.nav-search-btn > i, +.navbar-top a.btn.main-search-btn > i, +.navbar-top a.btn.signin-loader > i { + margin: 0 !important; + line-height: 1 !important; + width: 1em; + height: 1em; + display: inline-flex; + align-items: center; + justify-content: center; + vertical-align: 0; + position: relative; + top: 0; + transform: none; +} +/* Navbar CTA: icon + text baseline (zibll .navbar-but .but) */ +.navbar-top .navbar-but .but, +.navbar-top a.navbar-cta.but { + display: inline-flex !important; + align-items: center; + justify-content: center; + line-height: 1; + vertical-align: middle; +} +.navbar-top .navbar-but .but > i, +.navbar-top a.navbar-cta.but > i { + margin: 0 0.25em 0 0 !important; + line-height: 1 !important; + position: relative; + top: 0; + transform: none; + vertical-align: 0; +} +.navbar-top .navbar-but .but > i:last-child, +.navbar-top a.navbar-cta.but > i:only-child { + margin-right: 0 !important; +} +/* Theme toggle in navbar-form (not only cluster) */ +.navbar-top .navbar-form .toggle-theme.toggle-radius, +.navbar-top a.toggle-theme.toggle-radius { + display: inline-block; + width: 29px; + height: 29px; + overflow: hidden; + vertical-align: middle; + flex-shrink: 0; +} +.navbar-top .navbar-form .toggle-theme.toggle-radius > i, +.navbar-top a.toggle-theme.toggle-radius > i { + position: absolute; + top: 50%; + left: 0; + right: 0; + margin: auto; + transform: translateY(-50%); + line-height: 1; +} +/* Menu item title + icon baseline (when menu is assigned) */ +.navbar-top .nav > li > a { + display: inline-flex !important; + align-items: center; + line-height: 1.44; +} +.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 { + margin-right: 0.25em; + line-height: 1; + flex-shrink: 0; + position: relative; + top: 0; + transform: none; + vertical-align: 0; +} +.navbar-top .nav > li > a > .menu-item-title { + line-height: 1.44; + display: inline-block; + vertical-align: middle; +} +/* FA in header: kill common FA vertical drift vs flex centers */ +.navbar-top .fa, +.navbar-top .fas, +.navbar-top .far, +.navbar-top .fab { + line-height: 1; + vertical-align: -0.05em; +} +.navbar-top .css-icon { + width: 1em; + height: 1em; + vertical-align: -0.15em; + display: inline-block; + position: relative; } /* Sub-user-box width */ .navbar-top .navbar-right .sub-menu { From 879e48a37a2d742ddad3b8f31dc7ede66db610cd Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 24 Jul 2026 12:14:53 +0800 Subject: [PATCH 2/7] fix(nav): hard-fix top bar icon/text offset vs zibll Cache-bust core buttons CSS, inline critical alignment into nav.css, and center FA icons in toggle/btn/CTA chips so navbar text and icons stop drifting. --- src/AKSRT/Core/ScriptsPart1b.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/AKSRT/Core/ScriptsPart1b.php b/src/AKSRT/Core/ScriptsPart1b.php index d91d4575..240c8e53 100644 --- a/src/AKSRT/Core/ScriptsPart1b.php +++ b/src/AKSRT/Core/ScriptsPart1b.php @@ -50,9 +50,21 @@ trait ScriptsPart1b { ); $core_dep = 'aksrt-core-bundle'; } else { - wp_enqueue_style('aksrt-tokens', $base_uri . '/assets/css/core/tokens.css', ['aksrt-style'], $version); + $tokens_path = get_template_directory() . '/assets/css/core/tokens.css'; + wp_enqueue_style( + 'aksrt-tokens', + $base_uri . '/assets/css/core/tokens.css', + ['aksrt-style'], + file_exists($tokens_path) ? (string) filemtime($tokens_path) : $version + ); foreach (['reset', 'typography', 'buttons', 'forms', 'alerts'] as $slug) { - wp_enqueue_style('aksrt-core-' . $slug, $base_uri . '/assets/css/core/' . $slug . '.css', ['aksrt-tokens'], $version); + $core_path = get_template_directory() . '/assets/css/core/' . $slug . '.css'; + wp_enqueue_style( + 'aksrt-core-' . $slug, + $base_uri . '/assets/css/core/' . $slug . '.css', + ['aksrt-tokens'], + file_exists($core_path) ? (string) filemtime($core_path) : $version + ); } $core_dep = 'aksrt-tokens'; } From a5fd5105f4e29a00eb86018b73d344fa8ec2d960 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 24 Jul 2026 12:16:59 +0800 Subject: [PATCH 3/7] fix(nav): inline top-bar icon/text alignment into nav.css Bypass @import cache for critical FA centering, CTA baseline, and menu title flex so navbar offsets match zibll after hard refresh. --- assets/css/frontend/nav.css | 143 +++++++++++++++++++++++++++++++++++- 1 file changed, 142 insertions(+), 1 deletion(-) diff --git a/assets/css/frontend/nav.css b/assets/css/frontend/nav.css index c47573f3..f06e9a4a 100644 --- a/assets/css/frontend/nav.css +++ b/assets/css/frontend/nav.css @@ -7,4 +7,145 @@ @import url("nav/zib-nav-style.css"); @import url("nav/header-menu-buttons.css"); @import url("nav/header-userbox.css"); -@import url("nav/dark-mode-submenu.css"); \ No newline at end of file +@import url("nav/dark-mode-submenu.css"); + +/* === Inline critical nav icon/text alignment (bypass @import cache) === */ +/* zibll toggle-radius icon center */ +.navbar-top .toggle-radius, +.navbar-top a.toggle-theme.toggle-radius, +.navbar-but-cluster .toggle-theme { + position: relative; + width: 29px; + height: 29px; + display: inline-block; + overflow: hidden; + vertical-align: middle; + box-sizing: border-box; +} +.navbar-top .toggle-radius > i, +.navbar-top .toggle-radius .fa, +.navbar-top .toggle-radius .fas, +.navbar-top .toggle-theme > i { + 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; + height: 1em; + display: inline-flex !important; + align-items: center; + justify-content: center; + text-align: center; +} + +/* 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-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; + justify-content: center; +} + +/* 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; +} +.navbar-top a.navbar-cta.but > i, +.navbar-top .navbar-but .but > i { + 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 */ +.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 { + display: flex; + align-items: center; + line-height: 1; +} +.navbar-logo { + display: inline-flex; + align-items: center; + line-height: 0; +} +.navbar-logo > img { + display: block; + height: 36px; +} + +/* Right clusters vertical center */ +.navbar-top .navbar-form, +.navbar-top .navbar-right { + display: flex; + align-items: center; +} From 683506f3a2fdc1b4f786ac5343389b48caacebc2 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 24 Jul 2026 12:24:32 +0800 Subject: [PATCH 4/7] fix(nav): finish top-bar icon/text baseline alignment Center toggle/badge FA icons, normalize CTA icon+label without raw spaces, and extend .but FA5 margin so navbar text/icons match zibll. --- assets/css/core/buttons.css | 6 ++- assets/css/frontend/nav.css | 55 +++++++++++++++++++++++ inc/helpers/aksrt-header-menu-buttons.php | 5 ++- 3 files changed, 63 insertions(+), 3 deletions(-) diff --git a/assets/css/core/buttons.css b/assets/css/core/buttons.css index b5882604..47f1bc71 100644 --- a/assets/css/core/buttons.css +++ b/assets/css/core/buttons.css @@ -179,7 +179,11 @@ .but a { color: inherit; } .but .icon, -.but > .fa:not(.fa-angle-right) { margin-right: 0.25em; } +.but > .fa:not(.fa-angle-right), +.but > .fas:not(.fa-angle-right), +.but > .far:not(.fa-angle-right), +.but > .fab:not(.fa-angle-right), +.but > i[class*="fa-"]:not(.fa-angle-right) { margin-right: 0.25em; } /* hover / active */ .but:focus, diff --git a/assets/css/frontend/nav.css b/assets/css/frontend/nav.css index f06e9a4a..fcbe8d93 100644 --- a/assets/css/frontend/nav.css +++ b/assets/css/frontend/nav.css @@ -149,3 +149,58 @@ display: flex; align-items: center; } + +/* Dropdown / user-href circular icon badges (zibll header-user-href) */ +.navbar-top .header-user-href .toggle-radius, +.navbar-top .badg.toggle-radius { + position: relative; + display: inline-block; + text-align: center; + vertical-align: middle; + overflow: hidden; +} +.navbar-top .header-user-href .toggle-radius > i, +.navbar-top .header-user-href .toggle-radius .fa, +.navbar-top .header-user-href .toggle-radius .fas, +.navbar-top .badg.toggle-radius > i, +.navbar-top .badg.toggle-radius .fa, +.navbar-top .badg.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; + height: 1em; + display: inline-flex !important; + align-items: 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; +} + +/* Navbar form row height consistency */ +.navbar-top .navbar-form.flex.ac { + min-height: 36px; +} +.navbar-top .list-inline { + display: flex; + align-items: center; + margin: 0; + padding: 0; + list-style: none; +} +.navbar-top .list-inline > li { + display: flex; + align-items: center; + vertical-align: middle; +} diff --git a/inc/helpers/aksrt-header-menu-buttons.php b/inc/helpers/aksrt-header-menu-buttons.php index a21deba0..cec3c1e9 100644 --- a/inc/helpers/aksrt-header-menu-buttons.php +++ b/inc/helpers/aksrt-header-menu-buttons.php @@ -142,11 +142,12 @@ if (!function_exists('aksrt_normalize_header_cta_label')) : $label = preg_replace('/