Skip to content

Instantly share code, notes, and snippets.

@robdodson
robdodson / customprops.md
Last active February 4, 2016 04:42
Animating Custom Properties

Animating Custom Properties

Here's what the spec says:

Notably, they can even be transitioned or animated, but since the UA has no way to interpret their contents, they always use the "flips at 50%" behavior that is used for any other pair of values that can’t be intelligently interpolated. However, any custom property used in a @keyframes rule becomes animation-tainted, which affects how it is treated when referred to via the var()function in an animation property.

(this is theory, not Chrome practice quite yet)

  1. you can refer to custom properties in transition or animation endpoints, they'll "just work" (example)