Skip to content

Commit 0e13021

Browse files
committed
fix: maintain app content width when opening Viewer
- with 'position: fixed' sidebar is ripped out of flex container and main content fills the space before modal is rendered (that is visible to end users) - this also respects having app navigation open/closed (did not test without navigation though) Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
1 parent 5e68910 commit 0e13021

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

apps/viewer/apps/viewer/src/views/Viewer.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,6 +1427,15 @@ body:has(#viewer) {
14271427
width: calc(var(--app-sidebar-width) + var(--body-container-margin));
14281428
}
14291429
1430+
.app-navigation ~ #app-content-vue:has(~ #app-sidebar-vue:not([style*="display: none"])) {
1431+
flex-basis: calc(100% - 300px - clamp(300px, 27vw, 500px));
1432+
}
1433+
1434+
#app-content-vue:first-child:has(~ #app-sidebar-vue:not([style*="display: none"])),
1435+
.app-navigation--closed ~ #app-content-vue:has(~ #app-sidebar-vue:not([style*="display: none"])) {
1436+
flex-basis: calc(100% - clamp(300px, 27vw, 500px));
1437+
}
1438+
14301439
#header {
14311440
visibility: hidden;
14321441
}

0 commit comments

Comments
 (0)