Frontend/Themes: Fix handleMotion function (#94856)

This commit is contained in:
kay delaney
2024-10-17 12:02:16 +01:00
committed by GitHub
parent dca881289a
commit 4e93b0f467

View File

@@ -56,7 +56,7 @@ export function create(props: string | string[] = ['all'], options: CreateTransi
type ReducedMotionProps = 'no-preference' | 'reduce';
export function handleMotion(...props: ReducedMotionProps[]) {
return props.map((prop) => `@media (prefers-reduced-motion: ${prop})`).join(',');
return `@media ${props.map((prop) => `(prefers-reduced-motion: ${prop})`).join(',')}`;
}
export function getAutoHeightDuration(height: number) {