Rearrange code

This commit is contained in:
Lim Chee Aun 2023-10-31 20:21:37 +08:00
parent b17977a5c7
commit 3f6402349c

View file

@ -56,6 +56,7 @@ a[href^='http'][rel*='nofollow']:visited:not(:has(div)) {
overscroll-behavior: contain; overscroll-behavior: contain;
scroll-behavior: smooth; scroll-behavior: smooth;
background-color: var(--bg-color); background-color: var(--bg-color);
flex-grow: 1;
/* This `transform` fixes carousel blocking vertical scrolling for pointer devices on iPad */ /* This `transform` fixes carousel blocking vertical scrolling for pointer devices on iPad */
transform: translateZ(0); transform: translateZ(0);
} }
@ -79,6 +80,21 @@ a[href^='http'][rel*='nofollow']:visited:not(:has(div)) {
scroll-padding-top: 3em; scroll-padding-top: 3em;
} }
:is(#home-page, #welcome, #columns, #loader-root) ~ .deck-container {
z-index: 10;
position: fixed;
inset: 0;
}
:is(#home-page, #welcome, #columns, #loader-root):has(~ .deck-container) {
display: block;
position: absolute;
user-select: none;
pointer-events: none;
opacity: 0;
/* This causes scrollTop to be reset to 0 when the page is hidden */
/* content-visibility: hidden; */
}
.deck { .deck {
min-height: 100vh; min-height: 100vh;
min-height: 100dvh; min-height: 100dvh;
@ -1918,25 +1934,6 @@ meter.donut[hidden] {
} }
} }
.deck-container {
width: 100%;
flex-grow: 1;
}
:is(#home-page, #welcome, #columns, #loader-root) ~ .deck-container {
z-index: 10;
position: fixed;
inset: 0;
}
:is(#home-page, #welcome, #columns, #loader-root):has(~ .deck-container) {
display: block;
position: absolute;
user-select: none;
pointer-events: none;
opacity: 0;
/* This causes scrollTop to be reset to 0 when the page is hidden */
/* content-visibility: hidden; */
}
/* 404 */ /* 404 */
#not-found-page { #not-found-page {