Skip to content

Commit

Permalink
Adjustments from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
tyleralsbury committed Mar 29, 2022
1 parent 0e44a65 commit 2cf7a95
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/component-mega-menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@
padding-top: 0.6rem;
text-decoration: none;
transition: text-decoration var(--duration-short) ease;
word-wrap: break-word;
}

.mega-menu__link--level-2 {
font-size: 1.4rem;
}

.mega-menu__link--level-2:not(:only-child) {
margin-bottom: 1rem;
margin-bottom: 0.8rem;
}

.header--top-center .mega-menu__list {
Expand Down
1 change: 1 addition & 0 deletions assets/component-menu-drawer.css
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ details[open].menu-opening > .menu-drawer__submenu {
background-color: transparent;
font-family: var(--font-body-family);
font-style: var(--font-body-style);
text-align: left;
}

.no-js .menu-drawer__close-button {
Expand Down
2 changes: 2 additions & 0 deletions assets/details-disclosure.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class HeaderMenu extends DetailsDisclosure {
}

onToggle() {
document.body.classList.toggle('overflow-hidden', this.querySelectorAll('.mega-menu[open]').length);

if (document.documentElement.style.getPropertyValue('--header-bottom-position-desktop') !== '') return;
if (this.header) document.documentElement.style.setProperty('--header-bottom-position-desktop', `${Math.floor(this.header.getBoundingClientRect().bottom)}px`);
}
Expand Down

0 comments on commit 2cf7a95

Please sign in to comment.