Fixes: Scroll to top behavior when changing pages

Fixes: Different max-width on docs and other content
This commit is contained in:
Tom Moor
2017-09-04 08:56:07 -07:00
parent f4735246ad
commit 24686aac44
4 changed files with 9 additions and 16 deletions

View File

@ -252,13 +252,8 @@ const Container = styled(Flex)`
`;
const Content = styled(Flex)`
overflow: scroll;
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: ${props => (props.editMode ? 0 : layout.sidebarWidth)};
transition: left 200ms ease-in-out;
margin-left: ${props => (props.editMode ? 0 : layout.sidebarWidth)};
transition: margin-left 200ms ease-in-out;
`;
const MenuLink = styled(Link)`
@ -266,10 +261,13 @@ const MenuLink = styled(Link)`
`;
const Sidebar = styled(Flex)`
position: fixed;
top: 0;
bottom: 0;
left: ${props => (props.editMode ? `-${layout.sidebarWidth}` : 0)};
width: ${layout.sidebarWidth};
margin-left: ${props => (props.editMode ? `-${layout.sidebarWidth}` : 0)};
background: ${color.smoke};
transition: margin-left 200ms ease-in-out;
transition: left 200ms ease-in-out;
`;
const LinkSection = styled(Flex)`