[BUG] Issue with CSS transform
See original GitHub issueHi,
If I apply the framer motion animation on an element which is centered using the following CSS code:
.center {
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
}
Framer motion, will reset the transform property to 0. So it won’t be center anymore.
Here is a sample on CodeSandbox: https://codesandbox.io/s/fancy-hooks-4gj59?file=/src/App.js
Is there anyway to fix this behavior?
Thank you.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Safari rendering bug with CSS transform - a depth sorting / z ...
CSS transition transform z-index conflict in Safari (Works on Chrome / FF) CSS Translate Issue on Safari.
Read more >Reraster during CSS transform transitions to keep things crisp ...
Issue 224913 : Reraster during CSS transform transitions to keep things crisp *for ganesh mode* This issue has been migrated to Launch, see...
Read more >CSS translate with transition and overflow creates jumpy ...
This problem first appeared in Fx49(win10). Status: UNCONFIRMED → NEW. Ever confirmed: true. Keywords: regression ...
Read more >Debugging layout repaint issues triggered by CSS Transition
As seen from the code, the transition is applied to opacity and transform , which are the recommended properties to use when moving...
Read more >Is CSS Transform Dead? - Web Dev Simplified Blog
CSS just added individual rotate, translate, and scale properties ... If we swap to using CSS variables we can now get around this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There is also a
transformTemplate
prop you can use to output customtransform
strings.Is it possible to use layoutId together with transform template? I have a circle div and I need it to make tranform: translate(50%) in order to properly center it relatively to navigation item. But when I use tranform in css it overrides to transform none by framer. If I use transform template shared layout animation doesn’t perform