Fix scrolling behaviour when backdrop dialogs appear.
This commit is contained in:
@@ -73,11 +73,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
html {
|
html {
|
||||||
|
overflow: clip;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: var(--color-canvas);
|
background: var(--color-canvas);
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
overflow: auto;
|
||||||
|
scrollbar-gutter: stable;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: var(--font-sans);
|
font-family: var(--font-sans);
|
||||||
@@ -739,23 +742,10 @@ body.has-backdrop::before {
|
|||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Prevent scrolling via html to avoid scrollbar layout shift */
|
|
||||||
html:has(body.has-backdrop),
|
|
||||||
html:has(#auth-iframe) {
|
|
||||||
overflow: clip;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.has-backdrop {
|
body.has-backdrop {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make fixed elements (toast, dialog) position relative to body, not viewport */
|
|
||||||
/* This works because transform creates a new containing block for fixed children */
|
|
||||||
body.has-backdrop,
|
|
||||||
body:has(#auth-iframe) {
|
|
||||||
transform: translateZ(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
#auth-iframe {
|
#auth-iframe {
|
||||||
border: none;
|
border: none;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|||||||
Reference in New Issue
Block a user