Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion themes/osi/assets/js/build/theme.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => 'f179507f6e77a9763a06');
<?php return array('dependencies' => array(), 'version' => '42979785231fcdbb3f33');
2 changes: 1 addition & 1 deletion themes/osi/assets/js/build/theme.js

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions themes/osi/assets/js/src/theme/mega-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ if ( header && megaItems.length ) {
if ( suppressOpen || ! desktopNav.matches ) {
return;
}
item.classList.remove( 'is-dismissed' );
window.clearTimeout( closeTimer );
megaItems.forEach( ( other ) => {
if ( other !== item ) {
Expand Down Expand Up @@ -136,11 +137,12 @@ if ( header && megaItems.length ) {

// a panel opened by hover holds focus nowhere, so Escape has to be caught globally
document.addEventListener( 'keydown', ( event ) => {
if (
'Escape' === event.key &&
document.querySelector( '.nav-main--menu > .menu-item.megamenu.is-open' )
) {
megaItems.forEach( dismiss );
if ( 'Escape' !== event.key ) {
return;
}
const openItem = document.querySelector( '.nav-main--menu > .menu-item.megamenu.is-open' );
if ( openItem ) {
dismiss( openItem );
}
} );

Expand Down
6 changes: 0 additions & 6 deletions themes/osi/assets/scss/_6_components.navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,6 @@ footer {
padding: .5em;
}

.menu-item {
&.current-menu-item > a, &.current-menu-parent > a, &.current-menu-ancestor > a {
text-decoration: none;
}
}

}

& > .menu-item > a:hover,
Expand Down
13 changes: 7 additions & 6 deletions themes/osi/inc/class-osi-megamenu-walker.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,16 @@ public function walk( $elements, $max_depth, ...$args ) { // phpcs:ignore Squiz.
* to stay out of their sizing, and column flow would then fill that whole span before
* wrapping (@see T51ENG-2081).
*
* @param array $atts HTML attributes for the menu item's li.
* @param WP_Post $menu_item Menu item data object.
* @param stdClass $args An object of wp_nav_menu() arguments.
* @param integer $depth Depth of menu item.
* @param array $atts HTML attributes for the menu item's li.
* @param WP_Post|null $menu_item Menu item data object.
* @param stdClass|null $args An object of wp_nav_menu() arguments.
* @param integer $depth Depth of menu item.
*
* @return array
*/
public function add_panel_placement( array $atts, WP_Post $menu_item, stdClass $args, int $depth ): array {
if ( 1 !== $depth || null === $this->current_parent || 'primary_navigation' !== ( $args->theme_location ?? '' ) ) {
public function add_panel_placement( $atts, $menu_item = null, $args = null, $depth = 0 ) { // phpcs:ignore Squiz.Commenting.FunctionComment.ScalarTypeHintMissing,Squiz.Commenting.FunctionComment.TypeHintMissing -- untyped on purpose, see template-functions.php
if ( ! is_array( $atts ) || 1 !== (int) $depth || null === $this->current_parent
|| 'primary_navigation' !== ( is_object( $args ) ? ( $args->theme_location ?? '' ) : '' ) ) {
return $atts;
}

Expand Down
8 changes: 4 additions & 4 deletions themes/osi/inc/template-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,10 @@ function osi_supporters_shortcode_renderer( array $args = array() ): string {
* order — pointer-events:none already blocks the mouse, this aligns keyboard
* behavior with it.
*
* @param array $atts Link attributes.
* @param WP_Post $item Menu item data object.
* @param stdClass $args An object of wp_nav_menu() arguments.
* @param integer $depth Depth of menu item.
* @param array $atts Link attributes.
* @param WP_Post|null $item Menu item data object.
* @param stdClass|null $args An object of wp_nav_menu() arguments.
* @param integer $depth Depth of menu item.
*
* @return array
*/
Expand Down
3 changes: 0 additions & 3 deletions themes/osi/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion themes/osi/style.css.map

Large diffs are not rendered by default.

Loading