Skip to content

Commit

Permalink
fix(clayui.com): Adds overflow hidden on body when mobile nav is open
Browse files Browse the repository at this point in the history
issue #2805
  • Loading branch information
pat270 committed Jan 25, 2020
1 parent 94e34f3 commit 729cb66
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clayui.com/src/components/Sidebar/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const SideNavRef = React.createRef();

const onClick = () => {
SidebarRef.current.classList.toggle('toggler-expanded');

document.querySelector('body').classList.toggle('clay-overflow-hidden-md-down');
};

let scrollTop = 0;
Expand Down
6 changes: 6 additions & 0 deletions clayui.com/src/styles/site/_site.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ body {

// temporal hide

.clay-overflow-hidden-md-down {
@media (max-width: $screen-md - 1) {
overflow: hidden;
}
}

.style-toggler {
display: none;
}
Expand Down

0 comments on commit 729cb66

Please sign in to comment.