cssinjs/jss

Function Values in Keyframes

Open

#1,216 创建于 2019年10月15日

在 GitHub 查看
 (3 评论) (1 反应) (0 负责人)JavaScript (7,000 star) (434 fork)batch import
complexity:highfeature requesthelp wanted

描述

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.

贡献者指南