From 7b52a06cc18decf6c3bb0f36d463bf04e97cc096 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sat, 16 May 2026 14:33:55 -0500 Subject: [PATCH] fix(menu): remove hardcoded p-2 padding from menu icon spans The menu override templates were adding Bootstrap p-2 (padding) class to all menu icon spans, causing unwanted spacing around Font Awesome icons in navigation items. Icons should inherit their spacing from the surrounding link element, not add their own padding. Affected files: all mod_menu layout overrides (mainmenu_*, horizontal_*) Co-Authored-By: Claude Opus 4.6 (1M context) --- src/html/mod_menu/horizontal_component.php | 4 ++-- src/html/mod_menu/horizontal_heading.php | 4 ++-- src/html/mod_menu/horizontal_separator.php | 4 ++-- src/html/mod_menu/horizontal_url.php | 4 ++-- src/html/mod_menu/mainmenu_component.php | 4 ++-- src/html/mod_menu/mainmenu_heading.php | 4 ++-- src/html/mod_menu/mainmenu_separator.php | 4 ++-- src/html/mod_menu/mainmenu_url.php | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/html/mod_menu/horizontal_component.php b/src/html/mod_menu/horizontal_component.php index dfcfa7f..d2887cb 100644 --- a/src/html/mod_menu/horizontal_component.php +++ b/src/html/mod_menu/horizontal_component.php @@ -36,10 +36,10 @@ if ($item->menu_icon) { // The link is an icon if ($itemParams->get('menu_text', 1)) { // If the link text is to be displayed, the icon is added with aria-hidden - $linktype = '' . $item->title; + $linktype = '' . $item->title; } else { // If the icon itself is the link, it needs a visually hidden text - $linktype = '' . $item->title . ''; + $linktype = '' . $item->title . ''; } } diff --git a/src/html/mod_menu/horizontal_heading.php b/src/html/mod_menu/horizontal_heading.php index 990077e..af61674 100644 --- a/src/html/mod_menu/horizontal_heading.php +++ b/src/html/mod_menu/horizontal_heading.php @@ -22,10 +22,10 @@ if ($item->menu_icon) { // The link is an icon if ($itemParams->get('menu_text', 1)) { // If the link text is to be displayed, the icon is added with aria-hidden - $linktype = '' . $item->title; + $linktype = '' . $item->title; } else { // If the icon itself is the link, it needs a visually hidden text - $linktype = '' . $item->title . ''; + $linktype = '' . $item->title . ''; } } diff --git a/src/html/mod_menu/horizontal_separator.php b/src/html/mod_menu/horizontal_separator.php index 2c0c587..42579b9 100644 --- a/src/html/mod_menu/horizontal_separator.php +++ b/src/html/mod_menu/horizontal_separator.php @@ -22,10 +22,10 @@ if ($item->menu_icon) { // The link is an icon if ($itemParams->get('menu_text', 1)) { // If the link text is to be displayed, the icon is added with aria-hidden - $linktype = '' . $item->title; + $linktype = '' . $item->title; } else { // If the icon itself is the link, it needs a visually hidden text - $linktype = '' . $item->title . ''; + $linktype = '' . $item->title . ''; } } diff --git a/src/html/mod_menu/horizontal_url.php b/src/html/mod_menu/horizontal_url.php index 10b380b..1d81553 100644 --- a/src/html/mod_menu/horizontal_url.php +++ b/src/html/mod_menu/horizontal_url.php @@ -36,10 +36,10 @@ if ($item->menu_icon) { // The link is an icon if ($itemParams->get('menu_text', 1)) { // If the link text is to be displayed, the icon is added with aria-hidden - $linktype = '' . $item->title; + $linktype = '' . $item->title; } else { // If the icon itself is the link, it needs a visually hidden text - $linktype = '' . $item->title . ''; + $linktype = '' . $item->title . ''; } } diff --git a/src/html/mod_menu/mainmenu_component.php b/src/html/mod_menu/mainmenu_component.php index dfcfa7f..d2887cb 100644 --- a/src/html/mod_menu/mainmenu_component.php +++ b/src/html/mod_menu/mainmenu_component.php @@ -36,10 +36,10 @@ if ($item->menu_icon) { // The link is an icon if ($itemParams->get('menu_text', 1)) { // If the link text is to be displayed, the icon is added with aria-hidden - $linktype = '' . $item->title; + $linktype = '' . $item->title; } else { // If the icon itself is the link, it needs a visually hidden text - $linktype = '' . $item->title . ''; + $linktype = '' . $item->title . ''; } } diff --git a/src/html/mod_menu/mainmenu_heading.php b/src/html/mod_menu/mainmenu_heading.php index 990077e..af61674 100644 --- a/src/html/mod_menu/mainmenu_heading.php +++ b/src/html/mod_menu/mainmenu_heading.php @@ -22,10 +22,10 @@ if ($item->menu_icon) { // The link is an icon if ($itemParams->get('menu_text', 1)) { // If the link text is to be displayed, the icon is added with aria-hidden - $linktype = '' . $item->title; + $linktype = '' . $item->title; } else { // If the icon itself is the link, it needs a visually hidden text - $linktype = '' . $item->title . ''; + $linktype = '' . $item->title . ''; } } diff --git a/src/html/mod_menu/mainmenu_separator.php b/src/html/mod_menu/mainmenu_separator.php index 2c0c587..42579b9 100644 --- a/src/html/mod_menu/mainmenu_separator.php +++ b/src/html/mod_menu/mainmenu_separator.php @@ -22,10 +22,10 @@ if ($item->menu_icon) { // The link is an icon if ($itemParams->get('menu_text', 1)) { // If the link text is to be displayed, the icon is added with aria-hidden - $linktype = '' . $item->title; + $linktype = '' . $item->title; } else { // If the icon itself is the link, it needs a visually hidden text - $linktype = '' . $item->title . ''; + $linktype = '' . $item->title . ''; } } diff --git a/src/html/mod_menu/mainmenu_url.php b/src/html/mod_menu/mainmenu_url.php index 10b380b..1d81553 100644 --- a/src/html/mod_menu/mainmenu_url.php +++ b/src/html/mod_menu/mainmenu_url.php @@ -36,10 +36,10 @@ if ($item->menu_icon) { // The link is an icon if ($itemParams->get('menu_text', 1)) { // If the link text is to be displayed, the icon is added with aria-hidden - $linktype = '' . $item->title; + $linktype = '' . $item->title; } else { // If the icon itself is the link, it needs a visually hidden text - $linktype = '' . $item->title . ''; + $linktype = '' . $item->title . ''; } }