Skip to content

Commit

Permalink
Disable columns scroll snap for wider viewports
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeaun committed Aug 10, 2024
1 parent ff29e93 commit c27275a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -2401,6 +2401,7 @@ ul.link-list li a .icon {
/* COLUMNS */

#columns {
--column-size: 360px;
display: flex;
width: 100vw;
overflow-y: hidden;
Expand All @@ -2412,6 +2413,11 @@ ul.link-list li a .icon {
overscroll-behavior-x: contain;
/* This `transform` fixes horizontal scrolling for pointer devices on iPad */
transform: translateZ(0);

/* 360px * 2 */
@media (min-width: 720px) {
scroll-snap-type: none;
}
}
/* #columns::-webkit-scrollbar {
display: none;
Expand All @@ -2421,7 +2427,7 @@ ul.link-list li a .icon {
scroll-snap-align: start;
scroll-snap-stop: always;
overscroll-behavior: auto;
flex-basis: min(100vw, 360px);
flex-basis: min(100vw, var(--column-size));
flex-shrink: 0;
box-shadow: -1px 0 var(--bg-color), -2px 0 var(--drop-shadow-color),
-3px 0 var(--bg-color);
Expand Down

0 comments on commit c27275a

Please sign in to comment.