Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDFFORM 812 burger menu #655

Merged
merged 3 commits into from
Jun 11, 2024
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
26 changes: 13 additions & 13 deletions src/stories/Blocks/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,21 @@ export const Header = (props: HeaderProps) => {
>
<div>
<div className="header__menu-navigation-mobile">
<Pagefold
isInheriting={false}
isAContainer={false}
size="small"
<button
id="header-sidebar-nav__toggle"
className="header__menu-navigation-button header__button"
compProps={{
id: "header-sidebar-nav__toggle",
"aria-controls": "sidebarNav",
"aria-expanded": "false",
role: "button",
tabIndex: 0,
}}
aria-controls="sidebarNav"
aria-expanded="false"
>
<MenuIcon />
</Pagefold>
<Pagefold
isInheriting={false}
isAContainer={false}
size="small"
className="header__menu-navigation-pagefold"
>
<MenuIcon />
</Pagefold>
</button>
<div className="header__menu-navigation-logo">
<Logo
hasImage
Expand Down
7 changes: 7 additions & 0 deletions src/stories/Blocks/header/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@
align-items: center;
border-right: 1px solid $color__global-tertiary-1;
}
.header__menu-navigation-pagefold {
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}

.header__menu-profile,
.header__menu-bookmarked {
Expand Down
18 changes: 14 additions & 4 deletions src/stories/Library/header-sidebar-nav/header-sidebar-nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ $_menu_animation_delay: 0.2s;
transform: translateX(-100%);
transition: transform $_transition_speed $_bezier_transition;

@include media-query__small {
display: none;
}

ul.header__menu-navigation {
padding: 0;
display: flex;
Expand All @@ -46,6 +42,8 @@ $_menu_animation_delay: 0.2s;
text-decoration: none;
position: relative;
display: inline-block;
white-space: normal;
word-break: break-word;
}

.header__menu-navigation-link::after {
Expand Down Expand Up @@ -115,6 +113,10 @@ $_menu_animation_delay: 0.2s;
--sidebar-padding: #{$s-lg};
}

.header-sidebar-nav {
display: none;
}

.header-sidebar-nav__menu-wrapper {
max-width: 375px;
grid-gap: $s-lg;
Expand All @@ -124,3 +126,11 @@ $_menu_animation_delay: 0.2s;
padding-top: 120px;
}
}

// This reflects the current override of the burger menu state, which is
// controlled by the .has-burger-menu class on the html element.
// This takes effect when the desktop-menu has too many items, and gets
// changed to a burger menu.
.has-burger-menu .header-sidebar-nav {
display: block;
}
Loading