Skip to content

Fix transitions that use var()#965

Open
geforcefan wants to merge 1 commit into
mikke89:masterfrom
geforcefan:fix-transition-var
Open

Fix transitions that use var()#965
geforcefan wants to merge 1 commit into
mikke89:masterfrom
geforcefan:fix-transition-var

Conversation

@geforcefan

Copy link
Copy Markdown

Transitions never start when the transition property uses a variable:

body { --fast: 0.3s cubic-out; }
button { transition: background-color var(--fast); }

The same rule with a plain 0.3s cubic-out animates, the var() version does not.

TransitionPropertyChanges reads the local transition property before variables are resolved, so the value is still a var expression instead of a TRANSITIONLIST and the function returns early. Resolve the variables there the same way other properties do, then run the existing type check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant