fix(nav): isolate publish chip width with grid + button toggle
Render multi-type 发布 as button, size wrapper with inline-grid so the absolute menu cannot widen the chip on click/focus-within.
This commit is contained in:
@@ -186,12 +186,14 @@ if (!function_exists('aksrt_render_new_add_btns')) :
|
||||
}
|
||||
|
||||
$html = '<span class="' . esc_attr(trim(implode(' ', $wrap_tokens) . ' hover-show')) . '">';
|
||||
$html .= '<a href="javascript:;" class="' . esc_attr(trim('but newadd-btns__toggle navbar-cta ' . $cta_class)) . '" rel="nofollow">'
|
||||
// type=button keeps focus without navigating; avoids link min-width quirks.
|
||||
$html .= '<button type="button" class="' . esc_attr(trim('but newadd-btns__toggle navbar-cta ' . $cta_class)) . '">'
|
||||
. $label_html
|
||||
. ' <i class="fas fa-caret-down" aria-hidden="true"></i></a>';
|
||||
$html .= '<div class="hover-show-con dropdown-menu drop-newadd">';
|
||||
. ' <i class="fas fa-caret-down" aria-hidden="true"></i></button>';
|
||||
// Sibling dropdown (not a flex child of the painted chip).
|
||||
$html .= '<div class="hover-show-con drop-newadd" role="menu">';
|
||||
foreach ($actions as $a) {
|
||||
$html .= '<a rel="nofollow" class="newadd-btns__item" href="' . esc_url($a['url']) . '">';
|
||||
$html .= '<a rel="nofollow" class="newadd-btns__item" role="menuitem" href="' . esc_url($a['url']) . '">';
|
||||
$html .= '<i class="' . esc_attr($a['icon']) . '" aria-hidden="true"></i> '
|
||||
. '<span>' . esc_html($a['label']) . '</span>';
|
||||
$html .= '</a>';
|
||||
|
||||
Reference in New Issue
Block a user