Skip to content

Commit

Permalink
Hide sub-navigation on mobile to stop screen flickering while scrolling
Browse files Browse the repository at this point in the history
Ref: sourcegraph#3666

The sidebar appears above the content on screen sizes below 900px wide.

As we scroll down the page, sub-menus in the sidebar become active.

This pushes content down which deactivates the sub-menu, causing a loop.
  • Loading branch information
nielthiart committed Jan 24, 2023
1 parent d73f71c commit 2dd23bd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/styles/page.scss
Expand Up @@ -66,8 +66,14 @@
> li > ul {
padding-left: 0;

ul:not(.active) {
ul {
display: none;

@media (min-width: 900px) {
&.active {
display: block;
}
}
}
}

Expand Down

0 comments on commit 2dd23bd

Please sign in to comment.