- Created hvac-navigation-enhanced.css with modern dropdown styles - Pure CSS hover dropdowns for desktop (no JS needed) - Smooth animations with 300ms transitions - Professional hover effects with bottom border animation - Proper z-index layering (z-index: 9999 for dropdowns) - Keyboard navigation support - Added hvac-navigation-enhanced.js for enhanced UX - Mobile hamburger menu with smooth animations - Keyboard navigation (arrow keys, escape, enter) - Click outside to close - Accessibility improvements with ARIA attributes - Smooth scroll for anchor links - Fixed menu toggle visibility issue - Removed conflicting Astra theme buttons - Using pure CSS :hover for desktop dropdowns - Better mobile responsive behavior - Updated class-hvac-scripts-styles.php - Added new CSS and JS files to build pipeline - Proper dependency management Best practices implemented: - WCAG 2.1 AA compliant keyboard navigation - Focus management for accessibility - Smooth 300ms transitions for professional feel - Mobile-first responsive design - No JavaScript required for desktop dropdowns
109 lines
No EOL
3.3 KiB
CSS
109 lines
No EOL
3.3 KiB
CSS
/**
|
|
* HVAC Menu Toggle Fix
|
|
* Ensures Astra theme menu toggle buttons are visible in navigation
|
|
*
|
|
* Issue: Menu toggle buttons were hidden after CSS consolidation
|
|
* Solution: Override display:none with proper specificity
|
|
*/
|
|
|
|
/* Fix for desktop navigation dropdown toggles */
|
|
.hvac-trainer-menu .ast-menu-toggle,
|
|
.hvac-trainer-menu-wrapper .ast-menu-toggle,
|
|
.hvac-page-wrapper .ast-menu-toggle {
|
|
display: inline-flex !important;
|
|
align-items: center !important;
|
|
justify-content: center !important;
|
|
background: none !important;
|
|
border: none !important;
|
|
padding: 8px !important;
|
|
cursor: pointer !important;
|
|
color: inherit !important;
|
|
font-size: 12px !important;
|
|
line-height: 1 !important;
|
|
min-width: 24px !important;
|
|
min-height: 24px !important;
|
|
vertical-align: middle !important;
|
|
}
|
|
|
|
/* Ensure the arrow icon is visible */
|
|
.hvac-trainer-menu .ast-menu-toggle .ast-icon,
|
|
.hvac-trainer-menu-wrapper .ast-menu-toggle .ast-icon {
|
|
display: inline-block !important;
|
|
width: 12px !important;
|
|
height: 12px !important;
|
|
fill: currentColor !important;
|
|
}
|
|
|
|
/* Arrow rotation for open state */
|
|
.hvac-trainer-menu .menu-item-has-children.ast-submenu-expanded > .ast-menu-toggle .ast-icon,
|
|
.hvac-trainer-menu-wrapper .menu-item-has-children.ast-submenu-expanded > .ast-menu-toggle .ast-icon {
|
|
transform: rotate(180deg) !important;
|
|
transition: transform 0.3s ease !important;
|
|
}
|
|
|
|
/* Show submenus when expanded */
|
|
.hvac-trainer-menu .menu-item-has-children.ast-submenu-expanded > .sub-menu,
|
|
.hvac-trainer-menu-wrapper .menu-item-has-children.ast-submenu-expanded > .sub-menu {
|
|
display: block !important;
|
|
opacity: 1 !important;
|
|
visibility: visible !important;
|
|
}
|
|
|
|
/* Ensure submenus are hidden by default */
|
|
.hvac-trainer-menu .sub-menu,
|
|
.hvac-trainer-menu-wrapper .sub-menu {
|
|
display: none;
|
|
position: absolute;
|
|
top: 100%;
|
|
left: 0;
|
|
background: #ffffff;
|
|
border: 1px solid #e0e0e0;
|
|
border-radius: 4px;
|
|
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
|
|
min-width: 200px;
|
|
z-index: 9999;
|
|
padding: 8px 0;
|
|
margin: 0;
|
|
list-style: none;
|
|
}
|
|
|
|
/* Hide menu toggle text, show only arrow */
|
|
.hvac-trainer-menu .ast-menu-toggle .screen-reader-text,
|
|
.hvac-trainer-menu-wrapper .ast-menu-toggle .screen-reader-text {
|
|
position: absolute !important;
|
|
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
padding: 0 !important;
|
|
border: 0 !important;
|
|
height: 1px !important;
|
|
width: 1px !important;
|
|
overflow: hidden !important;
|
|
}
|
|
|
|
/* Mobile responsive adjustments */
|
|
@media (max-width: 992px) {
|
|
/* Hide desktop menu toggles on mobile */
|
|
.hvac-trainer-menu .ast-menu-toggle,
|
|
.hvac-trainer-menu-wrapper .ast-menu-toggle {
|
|
display: none !important;
|
|
}
|
|
|
|
/* Mobile menu should use hamburger instead */
|
|
.hvac-hamburger-menu {
|
|
display: block !important;
|
|
}
|
|
}
|
|
|
|
/* Ensure proper hover states */
|
|
.hvac-trainer-menu .ast-menu-toggle:hover,
|
|
.hvac-trainer-menu-wrapper .ast-menu-toggle:hover {
|
|
background-color: rgba(0, 0, 0, 0.05) !important;
|
|
border-radius: 4px !important;
|
|
}
|
|
|
|
/* Focus states for accessibility */
|
|
.hvac-trainer-menu .ast-menu-toggle:focus,
|
|
.hvac-trainer-menu-wrapper .ast-menu-toggle:focus {
|
|
outline: 2px solid var(--hvac-primary-500, #0274be) !important;
|
|
outline-offset: 2px !important;
|
|
border-radius: 4px !important;
|
|
} |