Skip to content

Commit 09363cc

Browse files
committed
fix(app): fix overflow flashing scrollbar on panel opening
1 parent 1c3b189 commit 09363cc

File tree

1 file changed

+54
-50
lines changed

1 file changed

+54
-50
lines changed

src/components/AppComponent.vue

+54-50
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const onBack = () => {
6262
</script>
6363

6464
<template>
65-
<div ref="appRef">
65+
<div ref="appRef" class="app-container">
6666
<NDialogProvider :to="appRef">
6767
<header :class="{ open: panelOpen }">
6868
<RouterView v-slot="{ Component }" name="navbar">
@@ -149,63 +149,67 @@ const onBack = () => {
149149
@use '~/styles/transition' as transition;
150150
@include transition.scale;
151151
152-
header {
153-
position: absolute;
154-
top: 0;
155-
z-index: layers.$layer-ui;
156-
display: flex;
157-
flex-direction: column;
158-
justify-content: center;
159-
width: 100%;
160-
min-height: layout.$header-navbar-height;
161-
162-
> :first-child {
163-
@include mixin.hover-background;
152+
.app-container {
153+
overflow: hidden;
154+
155+
header {
156+
position: absolute;
157+
top: 0;
158+
z-index: layers.$layer-ui;
159+
display: flex;
160+
flex-direction: column;
161+
justify-content: center;
162+
width: 100%;
163+
min-height: layout.$header-navbar-height;
164+
165+
> :first-child {
166+
@include mixin.hover-background;
167+
}
168+
169+
&.open > :first-child {
170+
background: var(--bg-gradient-60-90);
171+
// stylelint-disable-next-line property-no-vendor-prefix -- necessary for safari
172+
-webkit-backdrop-filter: blur(var(--bg-blur-20));
173+
backdrop-filter: blur(var(--bg-blur-20));
174+
}
164175
}
165176
166-
&.open > :first-child {
167-
background: var(--bg-gradient-60-90);
168-
// stylelint-disable-next-line property-no-vendor-prefix -- necessary for safari
169-
-webkit-backdrop-filter: blur(var(--bg-blur-20));
170-
backdrop-filter: blur(var(--bg-blur-20));
177+
main {
178+
position: relative;
179+
display: flex;
180+
flex-direction: column;
181+
align-items: center;
182+
justify-content: center;
183+
min-height: calc(var(--full-height) - #{layout.$header-navbar-height});
184+
margin-top: layout.$header-navbar-height;
185+
186+
&.full-height {
187+
min-height: var(--full-height);
188+
margin-top: 0;
189+
}
171190
}
172-
}
173191
174-
main {
175-
position: relative;
176-
display: flex;
177-
flex-direction: column;
178-
align-items: center;
179-
justify-content: center;
180-
min-height: calc(var(--full-height) - #{layout.$header-navbar-height});
181-
margin-top: layout.$header-navbar-height;
182-
183-
&.full-height {
184-
min-height: var(--full-height);
185-
margin-top: 0;
192+
footer {
193+
position: fixed;
194+
bottom: 0;
195+
z-index: layers.$layer-ui;
196+
width: 100%;
186197
}
187-
}
188198
189-
footer {
190-
position: fixed;
191-
bottom: 0;
192-
z-index: layers.$layer-ui;
193-
width: 100%;
194-
}
199+
.panel {
200+
position: relative;
201+
max-height: calc(100% - #{layout.$header-navbar-height});
202+
overflow: auto;
195203
196-
.panel {
197-
position: relative;
198-
max-height: calc(100% - #{layout.$header-navbar-height});
199-
overflow: auto;
200-
201-
&-header {
202-
position: sticky;
203-
top: 1rem;
204-
}
204+
&-header {
205+
position: sticky;
206+
top: 1rem;
207+
}
205208
206-
&-content {
207-
margin-top: -1.125rem;
208-
padding: 0 3rem 1.25rem;
209+
&-content {
210+
margin-top: -1.125rem;
211+
padding: 0 3rem 1.25rem;
212+
}
209213
}
210214
}
211215
</style>

0 commit comments

Comments
 (0)