From 7f8c0e32e4af1d0df9012eb3d261a962be196c9a Mon Sep 17 00:00:00 2001 From: Matt Batchelder Date: Thu, 26 Feb 2026 07:27:04 -0500 Subject: [PATCH] feat: Improve button styles and update nav-contact class handling for better consistency --- theme/assets/css/main.css | 9 ++++++--- theme/inc/setup.php | 9 ++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/theme/assets/css/main.css b/theme/assets/css/main.css index 944263e..e78faa7 100644 --- a/theme/assets/css/main.css +++ b/theme/assets/css/main.css @@ -372,13 +372,16 @@ p:last-child { margin-bottom: 0; } justify-content: center !important; text-align: center; padding: .6rem 1.8rem !important; + padding-bottom: .6rem !important; font-size: .85rem; border-radius: 50px; color: #fff !important; + line-height: 1; } -.nav-contact a.btn::after { display: none; } /* Remove underline animation from button */ -.site-header.scrolled .nav-contact a.btn { color: #fff !important; } -.site-header.over-light-hero:not(.scrolled) .nav-contact a.btn { color: #fff !important; } +.nav-contact a.btn::after { display: none !important; } /* Remove underline animation from button */ +.site-header.scrolled .nav-contact a.btn, +.site-header.over-light-hero:not(.scrolled) .nav-contact a.btn, +.site-header.scrolled .nav-menu .nav-contact > a.btn { color: #fff !important; } /* ── Dropdown sub-menu ─────────────────────────────────────── */ .nav-menu > li { diff --git a/theme/inc/setup.php b/theme/inc/setup.php index 8e57d35..3cbb28c 100644 --- a/theme/inc/setup.php +++ b/theme/inc/setup.php @@ -85,18 +85,17 @@ add_filter( 'nav_menu_link_attributes', function ( $atts, $item, $args ) { /** * Add nav-contact class to Contact menu item's list element. */ -add_filter( 'nav_menu_li_attributes', function ( $atts, $item, $args, $depth ) { +add_filter( 'nav_menu_css_class', function ( $classes, $item, $args, $depth ) { // Only apply to the primary menu if ( $args->theme_location !== 'primary' ) { - return $atts; + return $classes; } // Check if this is the Contact menu item (by URL or title) if ( strpos( $item->url, 'contact' ) !== false || $item->title === 'Contact' ) { - // Add nav-contact class - $atts['class'] = isset( $atts['class'] ) ? $atts['class'] . ' nav-contact' : 'nav-contact'; + $classes[] = 'nav-contact'; } - return $atts; + return $classes; }, 10, 4 );