fix side navigation scroll behavior on mobile
This commit is contained in:
parent
4a86d25891
commit
6377dc86e0
2 changed files with 11 additions and 6 deletions
|
@ -261,7 +261,7 @@ function SideNavigation(props: Props) {
|
|||
{TOP_LEVEL_LINKS.map(linkProps => {
|
||||
const { hideForUnauth, ...passedProps } = linkProps;
|
||||
return !email && linkProps.hideForUnauth && IS_WEB ? null : (
|
||||
<li key={linkProps.navigate}>
|
||||
<li key={linkProps.icon}>
|
||||
<Button
|
||||
{...passedProps}
|
||||
label={__(linkProps.label)}
|
||||
|
@ -309,7 +309,7 @@ function SideNavigation(props: Props) {
|
|||
const { hideForUnauth, ...passedProps } = linkProps;
|
||||
|
||||
return !email && hideForUnauth && IS_WEB ? null : (
|
||||
<li key={linkProps.navigate}>
|
||||
<li key={linkProps.icon}>
|
||||
<Button
|
||||
{...passedProps}
|
||||
label={__(linkProps.label)}
|
||||
|
@ -330,7 +330,7 @@ function SideNavigation(props: Props) {
|
|||
const { hideForUnauth, ...passedProps } = linkProps;
|
||||
|
||||
return !email && hideForUnauth && IS_WEB ? null : (
|
||||
<li key={linkProps.navigate} className="mobile-only">
|
||||
<li key={linkProps.icon} className="mobile-only">
|
||||
<Button
|
||||
{...passedProps}
|
||||
label={__(linkProps.label)}
|
||||
|
|
|
@ -20,16 +20,20 @@
|
|||
.navigation {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
overflow-y: auto;
|
||||
top: var(--header-height);
|
||||
width: var(--side-nav-width);
|
||||
height: calc(100vh - var(--header-height));
|
||||
overflow-y: hidden;
|
||||
border-right: 1px solid var(--color-border);
|
||||
padding-top: var(--spacing-l);
|
||||
padding-bottom: var(--spacing-xl);
|
||||
|
||||
&:hover {
|
||||
overflow-y: auto;
|
||||
@media (min-width: $breakpoint-small) {
|
||||
overflow-y: hidden;
|
||||
|
||||
&:hover {
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,6 +74,7 @@
|
|||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
width: 100%;
|
||||
color: var(--color-navigation-link);
|
||||
padding-left: var(--spacing-s);
|
||||
font-size: var(--font-body);
|
||||
|
|
Loading…
Reference in a new issue