Files
web/components/Header/MainMenu/NavigationMenu/NavigationMenuItem/navigationMenuItem.module.css
Erik Tiekstra c98c7a2d6b Merged in feat/SW-1339-mobile-navigation (pull request #1178)
feat(SW-1339): Now supporting sitewide alert height to decide the position of the navigation menus

* feat(SW-1339): Now supporting sitewide alert height to decide the position of the navigation menus


Approved-by: Fredrik Thorsson
Approved-by: Matilda Landström
2025-01-21 10:52:39 +00:00

59 lines
1.2 KiB
CSS

.navigationMenuItem {
font-weight: 500; /* Should be fixed when variables starts working: var(--typography-Body-Bold-fontWeight); */
}
.navigationMenuItem.mobile {
display: flex;
justify-content: space-between;
padding: var(--Spacing-x2) 0;
font-size: var(--typography-Subtitle-1-Mobile-fontSize);
}
.chevron {
transition: transform 0.3s;
}
.chevron.isExpanded {
transform: rotate(180deg);
}
.dropdown {
background-color: var(--Base-Surface-Primary-light-Normal);
z-index: var(--menu-overlay-z-index);
overflow: hidden;
}
@media screen and (max-width: 767px) {
.dropdown {
position: fixed;
width: 100%;
top: calc(
var(--main-menu-mobile-height) + var(--sitewide-alert-height) + 1px
);
right: -100vw;
bottom: 0;
transition: right 0.3s;
overflow-y: auto;
}
.dropdown.isExpanded {
right: 0;
}
}
@media screen and (min-width: 768px) {
.dropdown {
display: none;
position: absolute;
top: calc(
3.5rem - 2px
); /* 3.5rem is the height of the main menu + bottom padding. */
left: 50%;
transform: translateX(-50%);
border-radius: var(--Corner-radius-Large);
box-shadow: 0 0 14px 6px rgba(0, 0, 0, 0.1);
}
.dropdown.isExpanded {
display: grid;
}
}