Various sidebar fixes (#5278

* fix: Right sidebar depth
Re-arrange order of document metadata

* fix: Comment reply not focused on 'Reply…' tap

* fix: Sidebar animation oddities on mobile/Safari
This commit is contained in:
Tom Moor
2023-04-30 15:42:05 -04:00
committed by GitHub
parent d8b4fef554
commit 20f3c55914
5 changed files with 23 additions and 26 deletions

View File

@@ -69,7 +69,7 @@ function Right({ children, border, className }: Props) {
const style = React.useMemo(
() =>
isMobile
? { width: "80%" }
? { width: "80vw" }
: {
width: `${ui.sidebarRightWidth}px`,
},
@@ -112,9 +112,10 @@ function Right({ children, border, className }: Props) {
}
const Position = styled(Flex)`
position: fixed;
position: absolute;
top: 0;
bottom: 0;
left: 0;
`;
const Sidebar = styled(m.div)<{
@@ -123,17 +124,16 @@ const Sidebar = styled(m.div)<{
display: flex;
flex-shrink: 0;
background: ${s("background")};
max-width: 80%;
max-width: 80vw;
border-left: 1px solid ${s("divider")};
transition: border-left 100ms ease-in-out;
z-index: 1;
z-index: ${depths.sidebar};
${breakpoint("mobile", "tablet")`
position: absolute;
top: 0;
right: 0;
bottom: 0;
z-index: ${depths.sidebar};
`}
${breakpoint("tablet")`