11 lines
375 B
TypeScript
11 lines
375 B
TypeScript
export function supportsScrollTimeline(): boolean {
|
|
// @ts-ignore
|
|
return typeof (CSS as any)?.scrollTimeline !== 'undefined'
|
|
}
|
|
export function initScrollFallback() {
|
|
if (typeof window === 'undefined') return
|
|
const prefersReduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches
|
|
if (prefersReduced) return
|
|
}
|
|
export function disableAnimations() { }
|