Skip to content

Commit

Permalink
fix momentum scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
andyschwab committed Dec 20, 2024
1 parent 3ce56b0 commit 157abd4
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -815,3 +815,33 @@ body.loading #about * {
background: var(--color-dark);
margin-top: 100vh;
}

/* Control iOS momentum scrolling */
html,
body {
/* Disable momentum scrolling at the root level */
-webkit-overflow-scrolling: auto;
overflow-y: scroll;
touch-action: pan-y;
-webkit-touch-callout: none;
-webkit-tap-highlight-color: transparent;
}

/* Key containers that should have controlled scrolling */
.story-container,
.story-scroll-container,
#about,
.static-content {
/* More controlled scroll behavior */
-webkit-overflow-scrolling: auto;
overflow-y: visible;
overscroll-behavior: none;
touch-action: pan-y;
}

/* Allow text selection only in content areas */
.about-content,
.scene-content {
user-select: text;
-webkit-user-select: text;
}

0 comments on commit 157abd4

Please sign in to comment.