Skip to content

theme/without-transitions

import { … } from 'zidane-ui'ui/src/theme/without-transitions.ts

Functions#

withoutTransitionsFunction#

Run a theme swap with every transition off for one frame (.zg-no-transitions), so surfaces snap to the new palette together instead of cross-fading at their own speeds.

TypeScript
function withoutTransitions(apply: () => void, root?: HTMLElement): void
Parameters
NameTypeDefaultDescription
apply() => void

Makes the change, such as setting the new theme's variables.

root?HTMLElementdocument.documentElement

The element that gets the zg-no-transitions class. Defaults to document.documentElement.

ui/src/theme/without-transitions.ts:10