Skip to content

Commit

Permalink
prevent layout shift (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanto authored Apr 13, 2022
1 parent 22acddc commit af51b86
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/docs-site/src/layouts/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function({ children, tableOfContents }) {
</div>
</div>
<div className="flex max-w-screen-xl px-4 mx-auto md:px-0 mt-14">
<div className="hidden w-56 pr-12 lg:block">
<div className="order-1 hidden w-56 pr-12 lg:block">
<h6 className="text-sm font-semibold text-gray-900">
Getting started
</h6>
Expand Down Expand Up @@ -95,13 +95,13 @@ export default function({ children, tableOfContents }) {
</li>
</ul>
</div>
<div className="grow prose prose-pre:rounded-none md:prose-pre:rounded prose-code:text-purple-600 mb-32 md:min-w-[65ch] max-w-[calc(100vw-2rem)] md:max-w-prose mx-auto lg:mx-0">
{children}
</div>
<div className="hidden w-56 pl-12 text-xs xl:block">
<div className="order-3 hidden w-56 pl-12 text-xs xl:block">
<div className="font-semibold uppercase">On this page</div>
<TOC tableOfContents={tableOfContents} />
</div>
<div className="order-2 grow prose prose-pre:rounded-none md:prose-pre:rounded prose-code:text-purple-600 mb-32 md:min-w-[65ch] max-w-[calc(100vw-2rem)] md:max-w-prose mx-auto lg:mx-0">
{children}
</div>
</div>
</div>
);
Expand Down

1 comment on commit af51b86

@vercel
Copy link

@vercel vercel bot commented on af51b86 Apr 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.