0👍
✅
Okay, I’ve been solving the wrong problem. Finally I found my solution from this Q&A.
The problem was from the css transform-origin
which is causing the positioning of the buttons when transform: scale()
. So the solution is wrapping the buttons with a div and set transform-origin: 0 0;
, which will reset the origin of the div wrapping the buttons when scaling.
Source:stackexchange.com