feat: Improve button styles and update nav-contact class handling for better consistency
This commit is contained in:
@@ -372,13 +372,16 @@ p:last-child { margin-bottom: 0; }
|
|||||||
justify-content: center !important;
|
justify-content: center !important;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: .6rem 1.8rem !important;
|
padding: .6rem 1.8rem !important;
|
||||||
|
padding-bottom: .6rem !important;
|
||||||
font-size: .85rem;
|
font-size: .85rem;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
|
line-height: 1;
|
||||||
}
|
}
|
||||||
.nav-contact a.btn::after { display: none; } /* Remove underline animation from button */
|
.nav-contact a.btn::after { display: none !important; } /* Remove underline animation from button */
|
||||||
.site-header.scrolled .nav-contact a.btn { color: #fff !important; }
|
.site-header.scrolled .nav-contact a.btn,
|
||||||
.site-header.over-light-hero:not(.scrolled) .nav-contact a.btn { color: #fff !important; }
|
.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 ─────────────────────────────────────── */
|
/* ── Dropdown sub-menu ─────────────────────────────────────── */
|
||||||
.nav-menu > li {
|
.nav-menu > li {
|
||||||
|
|||||||
@@ -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 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
|
// Only apply to the primary menu
|
||||||
if ( $args->theme_location !== 'primary' ) {
|
if ( $args->theme_location !== 'primary' ) {
|
||||||
return $atts;
|
return $classes;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if this is the Contact menu item (by URL or title)
|
// Check if this is the Contact menu item (by URL or title)
|
||||||
if ( strpos( $item->url, 'contact' ) !== false || $item->title === 'Contact' ) {
|
if ( strpos( $item->url, 'contact' ) !== false || $item->title === 'Contact' ) {
|
||||||
// Add nav-contact class
|
$classes[] = 'nav-contact';
|
||||||
$atts['class'] = isset( $atts['class'] ) ? $atts['class'] . ' nav-contact' : 'nav-contact';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $atts;
|
return $classes;
|
||||||
}, 10, 4 );
|
}, 10, 4 );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user