Skip to content

Commit 5d1e15f

Browse files
committed
feat: more smooth
1 parent 48a7a87 commit 5d1e15f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

app/assets/main.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,15 @@ html {
5858
-webkit-font-smoothing: antialiased;
5959
-moz-osx-font-smoothing: grayscale;
6060
text-rendering: optimizeLegibility;
61+
scroll-behavior: smooth;
62+
scroll-padding-top: 5rem; /* Offset for fixed header - otherwise anchor headers are cutted */
63+
}
64+
65+
/* Disable smooth scrolling if user prefers reduced motion */
66+
@media (prefers-reduced-motion: reduce) {
67+
html {
68+
scroll-behavior: auto;
69+
}
6170
}
6271

6372
/*

0 commit comments

Comments
 (0)