Skip to content
Gloss v2.0.0
Source
Foundations

Motion

Two durations, one easing curve, and one rule that overrides both: if the reader asked for less motion, they get none. This is an interface, not a title sequence.

Durations

Short ease transitions on hover and focus only — no bounce, no springy easing, no page-transition choreography.

TokenValueUse for
--gl-dur-fast 0.12s Hover and focus color/border transitions — the default.
--gl-dur-base 0.16s Switch track and thumb — the one moving part in the system.

One easing

There is exactly one curve in the system. Hover the tile below to run it.

Reduced motion is not a downgrade

tokens.css includes a prefers-reduced-motion: reduce block that sets every duration token to 0ms, and the base stylesheet clamps any remaining transition or animation to a hundredth of a millisecond. Components do not have to opt in, and cannot opt out.

@media (prefers-reduced-motion: reduce) {
  :root {
    --gl-dur-fast: 0ms;
    --gl-dur-base: 0ms;
  }
}

The state change still happens. The Switch still moves. It simply arrives instead of traveling.

Motion in practice
Markup
<label class="switch">
  <input type="checkbox" role="switch" checked>
  <span></span>
  Dark mode
</label>
<label class="switch">
  <input type="checkbox" role="switch">
  <span></span>
  Weekly digest
</label>

Rules