Skip to content

Commit

Permalink
fixed some sidebar issues with mobile styles
Browse files Browse the repository at this point in the history
  • Loading branch information
abottega committed Jul 27, 2021
1 parent f18b922 commit f00946b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
16 changes: 11 additions & 5 deletions lib/components/Sidebar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ const SidebarWrapper = styled("div")(
alignContent: "stretch",
"@media screen and (max-width: 900px)": {
width: "100%",
height: "50vh",
height: "auto",
minWidth: "auto",
maxWidth: "initial",
minHeight: "initial",
maxHeight: themeGet("appScale.sidebarMobileHeight")(props),
position: "fixed",
bottom: "0",
left: "0",
Expand All @@ -49,7 +50,7 @@ export const SidebarTabs = styled("div")(
justifyContent: "flex-start",
textAlign: "center",
"@media screen and (max-width: 900px)": {
height: "54px",
height: themeGet("appScale.navBarSize")(props),
flexDirection: "row",
minHeight: "initial",
minWidth: "initial"
Expand Down Expand Up @@ -137,8 +138,12 @@ const SidebarPanelStyle = styled("div")(
width: "100%",
minWidth: "initial",
maxWidth: "initial",
maxHeight: "calc(50vh - 54px)",
height: "calc(50vh - 54px)"
height:
"calc(" +
themeGet("appScale.sidebarMobileHeight")(props) +
" - " +
themeGet("appScale.navBarSize")(props) +
")"
}
}),
SidebarStyles
Expand Down Expand Up @@ -170,7 +175,8 @@ export const SidebarClose = styled("label")(
top: "-10px",
left: "calc(50% - 12px)",
right: "auto",
transform: "rotate(-90deg)"
transform: "rotate(-90deg)",
cursor: "s-resize"
}
}),
SidebarStyles
Expand Down
1 change: 1 addition & 0 deletions lib/systemtheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ export const mediaQueries = {
export const appScale = {
navBarSize: "54px",
sidebarMaxWidth: "360px",
sidebarMobileHeight: "50vh",
mobileNavMenuWidth: "250px"
};

Expand Down

0 comments on commit f00946b

Please sign in to comment.