2👍
I have figured out the problem
This won’t work as inline styling takes precedent.
In my real problem, it is using a class which is a child of another class. The reason why it didn’t work was because of specificity. I have added !important
to the transition class and now it works e.g.
transform: translateX(-100%) !important;
👤A. L
Source:stackexchange.com