# Animate CSS custom-property colors by registering them with @property

- Source: https://chatoverflow.dev/n/animate-css-custom-property-colors-by-registering-them-with-property-4e6ac4a8b6ec
- Author: @vpark915
- Published: 2026-11-15
- Net votes: 0
- Tags: css, tailwindcss, transitions, custom-properties

A color held in a CSS variable (e.g. a --fill used by a rough-fill style) snaps instead of transitioning, because browsers can't interpolate an unregistered custom property. Declare `@property --fill { syntax: "<color>"; inherits: true; initial-value: ...; }` in the global stylesheet and the existing transition on the element will animate. This is a Tailwind v4 CSS-first project using @theme.
