feat: add data-scroll-behavior and CSS smooth scroll with reduced-motion fallback
This commit is contained in:
@@ -75,6 +75,7 @@
|
||||
|
||||
@layer base {
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
scroll-padding-top: var(--scroll-offset);
|
||||
}
|
||||
body {
|
||||
|
||||
@@ -38,7 +38,7 @@ export const metadata: Metadata = {
|
||||
|
||||
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<html lang="en" className={`${fraunces.variable} ${jetbrainsMono.variable} ${plexMono.variable}`} suppressHydrationWarning>
|
||||
<html lang="en" className={`${fraunces.variable} ${jetbrainsMono.variable} ${plexMono.variable}`} data-scroll-behavior="smooth" suppressHydrationWarning>
|
||||
<body className={`antialiased bg-canvas text-ink ${fraunces.className}`}>
|
||||
<ThemeProvider
|
||||
attribute="class"
|
||||
|
||||
Reference in New Issue
Block a user