Skip to content

Commit 7df3052

Browse files
fix(theme): nav background doesn't extend fully and gap after sidebar with non-overlay scrollbars
closes #4653 Co-authored-by: Burrito <[email protected]>
1 parent 9238e00 commit 7df3052

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/client/theme-default/components/VPNavBar.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,22 @@ watchPostEffect(() => {
170170
.VPNavBar.has-sidebar .content {
171171
position: relative;
172172
z-index: 1;
173-
padding-right: 32px;
174173
padding-left: var(--vp-sidebar-width);
175174
}
175+
176+
.VPNavBar.has-sidebar .content-body {
177+
padding-right: 32px;
178+
}
176179
}
177180
178181
@media (min-width: 1440px) {
179182
.VPNavBar.has-sidebar .content {
180-
padding-right: calc((100vw - var(--vp-layout-max-width)) / 2 + 32px);
181183
padding-left: calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width));
182184
}
185+
186+
.VPNavBar.has-sidebar .content-body {
187+
padding-right: calc((100vw - var(--vp-layout-max-width)) / 2 + 32px);
188+
}
183189
}
184190
185191
.content-body {

src/client/theme-default/components/VPSidebar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ watch(
111111
112112
@media (min-width: 1440px) {
113113
.VPSidebar {
114-
padding-left: max(32px, calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));
115-
width: calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px);
114+
padding-left: max(32px, calc((100vw - (var(--vp-layout-max-width) - 64px)) / 2));
115+
width: calc((100vw - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px);
116116
}
117117
}
118118

0 commit comments

Comments
 (0)