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.
This commit is contained in:
@@ -142,11 +142,12 @@ if (!function_exists('aksrt_normalize_header_cta_label')) :
|
||||
$label = preg_replace('/<i\s+class=(["\'])(?!fas\b|far\b|fab\b)/', '<i class=$1fas ', $label) ?? $label;
|
||||
|
||||
if (stripos($label, '<i') === false) {
|
||||
$label = '<i class="' . esc_attr($fallback_icon) . '" aria-hidden="true"></i> <span class="navbar-cta-text">' . esc_html(wp_strip_all_tags($label)) . '</span>';
|
||||
// No space between icon and label — spacing via CSS margin (zibll .but > .fa).
|
||||
$label = '<i class="' . esc_attr($fallback_icon) . '" aria-hidden="true"></i><span class="navbar-cta-text">' . esc_html(wp_strip_all_tags($label)) . '</span>';
|
||||
} else {
|
||||
$label = preg_replace(
|
||||
'/(<\/i>)\s*([^<].*)$/u',
|
||||
'$1 <span class="navbar-cta-text">$2</span>',
|
||||
'$1<span class="navbar-cta-text">$2</span>',
|
||||
$label
|
||||
) ?? $label;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user