cssinjs/jss

Function Values in Keyframes

Open

#1216 opened on Oct 15, 2019

View on GitHub
 (3 comments) (1 reaction) (0 assignees)JavaScript (7,000 stars) (434 forks)batch import
complexity:highfeature requesthelp wanted

Description

I've been stuck on this for a few days and I believe that it is a bug.

Thanks for making this awesome library!

Expected behavior: Function values used in @keyframes do not appear to attach correctly to the style sheet.

Describe the bug: The function is run, but not applied to the style sheet. Looking in chrome's inspector I can see that the keyframe is setup, but does not have properties inside of it.

Codesandbox link: https://codesandbox.io/s/react-jss-playground-5w8nc?fontsize=14

Basically this:

"@keyframes my-animation": {
    "25%": {
      backgroundColor: ({ customColor }) => customColor
    }
}

Versions (please complete the following information): 10.0.0

Based on issue https://github.com/cssinjs/jss/issues/471 I thought this problem was fixed. I could be using the tool incorrectly.

Contributor guide