Skip to content

Commit

Permalink
Merge pull request #12460 from ethereum/dev-docs-layout
Browse files Browse the repository at this point in the history
Fix: dev docs layout on medium screen sizes [Fixes #8364]
  • Loading branch information
nhsz authored Mar 21, 2024
2 parents eadc633 + 2393c10 commit 9b66046
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
13 changes: 10 additions & 3 deletions src/components/DocsNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ const CardLink = ({ docData, isPrev, contentNotTranslated }: CardLinkProps) => {
<LinkBox
as={Flex}
alignItems="center"
mt={4}
w="262px"
w="full"
flex="1"
h="82px"
bg="background.base"
border="1px"
Expand Down Expand Up @@ -145,7 +145,14 @@ const DocsNav = ({ contentNotTranslated }: DocsNavProps) => {
<Flex
as="nav"
aria-label="Paginate to document"
direction={{ base: "column-reverse", md: "row" }}
direction={{
base: "column-reverse",
md: "row",
lg: "column-reverse",
xl: "row",
}}
mt="8"
gap="4"
justify="space-between"
alignItems={{ base: "center", md: "flex-start" }}
>
Expand Down
4 changes: 2 additions & 2 deletions src/components/SideNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ const SideNav = ({ path }: SideNavProps) => {
pt={8}
pb={16}
h="calc(100vh - 80px)" // TODO take footer into account for height?
w="calc((100% - 1448px) / 2 + 298px)"
minW="298px"
w="calc((100% - 1448px) / 2 + 256px)"
minW="256px"
overflowY="auto"
transition="transform 0.2s ease"
bgColor="background.base"
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/Docs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const Content = (props: ChildOnlyProp) => {
<Box
as={MainArticle}
flex={`1 1 ${mdBreakpoint}`}
maxW={{ base: "full", lg: mdBreakpoint }}
w={{ base: "full", lg: "0" }}
pt={{ base: 32, md: 12 }}
pb={{ base: 8, md: 16 }}
px={{ base: 8, md: 16 }}
Expand Down

0 comments on commit 9b66046

Please sign in to comment.