Skip to content

Commit

Permalink
fix: docs layout shifting
Browse files Browse the repository at this point in the history
  • Loading branch information
zernonia committed Oct 16, 2023
1 parent 970a16d commit 12eaf83
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions docs/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,27 @@
}
}

/* body {
--vp-layout-max-width: calc(1440px + var(--scrollbar-width, 0px));
} */

/* Fix the layout shift for Vitepress https://github.com/vuejs/vitepress/pull/1844/files */
@media (min-width: 768px) {
.VPContent, .VPLocalNav, .VPNav, .VPHome {
width: 100vw !important;
}
.VPFooter {
width: 100vw !important;
padding: 32px !important;
}
}
@media (min-width: 1440px) {
.VPSidebar {
padding-left: max(32px, calc((100vw - (var(--vp-layout-max-width) - 64px)) / 2)) !important;
width: calc((100vw - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px) !important;
}
}

body {
overflow-x: hidden;
}

/**
* Component: Algolia
Expand Down

0 comments on commit 12eaf83

Please sign in to comment.