Skip to content

Commit 9b66046

Browse files
authored
Merge pull request #12460 from ethereum/dev-docs-layout
Fix: dev docs layout on medium screen sizes [Fixes #8364]
2 parents eadc633 + 2393c10 commit 9b66046

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

src/components/DocsNav.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ const CardLink = ({ docData, isPrev, contentNotTranslated }: CardLinkProps) => {
5858
<LinkBox
5959
as={Flex}
6060
alignItems="center"
61-
mt={4}
62-
w="262px"
61+
w="full"
62+
flex="1"
6363
h="82px"
6464
bg="background.base"
6565
border="1px"
@@ -145,7 +145,14 @@ const DocsNav = ({ contentNotTranslated }: DocsNavProps) => {
145145
<Flex
146146
as="nav"
147147
aria-label="Paginate to document"
148-
direction={{ base: "column-reverse", md: "row" }}
148+
direction={{
149+
base: "column-reverse",
150+
md: "row",
151+
lg: "column-reverse",
152+
xl: "row",
153+
}}
154+
mt="8"
155+
gap="4"
149156
justify="space-between"
150157
alignItems={{ base: "center", md: "flex-start" }}
151158
>

src/components/SideNav.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ const SideNav = ({ path }: SideNavProps) => {
156156
pt={8}
157157
pb={16}
158158
h="calc(100vh - 80px)" // TODO take footer into account for height?
159-
w="calc((100% - 1448px) / 2 + 298px)"
160-
minW="298px"
159+
w="calc((100% - 1448px) / 2 + 256px)"
160+
minW="256px"
161161
overflowY="auto"
162162
transition="transform 0.2s ease"
163163
bgColor="background.base"

src/layouts/Docs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ const Content = (props: ChildOnlyProp) => {
150150
<Box
151151
as={MainArticle}
152152
flex={`1 1 ${mdBreakpoint}`}
153-
maxW={{ base: "full", lg: mdBreakpoint }}
153+
w={{ base: "full", lg: "0" }}
154154
pt={{ base: 32, md: 12 }}
155155
pb={{ base: 8, md: 16 }}
156156
px={{ base: 8, md: 16 }}

0 commit comments

Comments
 (0)