Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Animate mini cannot animate CSS properties (even registered ones) #3002

Open
bakura10 opened this issue Jan 15, 2025 · 1 comment
Open
Labels
bug Something isn't working

Comments

@bakura10
Copy link

Hi,

When trying to animate a CSS property (even a registered one), this won't work: https://codesandbox.io/p/sandbox/motion-11-spring-forked-jx7c6t?file=%2Findex.js%3A9%2C17&workspaceId=ws_2ajUMWBiBa7sDb8MJCFnBo

The issue is that on the final state, Motion adds extra '--':

image
@bakura10 bakura10 added the bug Something isn't working label Jan 15, 2025
@bakura10
Copy link
Author

bakura10 commented Jan 24, 2025

@mattgperry I'm not 100% confident on Motion internals but it seems the issue is coming from here:

element.style.setProperty(`--${name}`, value as string)

The name is already qualified with the --, so this just doubles it.

EDIT: I tried to copy this repo and apply a fix myself, but I was completely unable to install the dependencies of Motion. Doing a npm install failed :(. The list of dependencies being huge I just could not understand how to install all the dependencies properly for this project. As the fix does not seems complex I will leave it to someone else who managed to install this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant