I'm stuck in this situation where I am trying to apply the transition: all to an element in a way that everything would transition except one property(background-color in my case).
The only possible solution I see for this is to mention specific transitions for all the problems instead of using all. Is there any way I can get away with using all and still transition everything except one property?
Cool!! nice trick, thanks for sharing! 😊
I checked with using 0 btw.. and it works for me, 0ms however does not work and that felt a little ambiguous to me. I guess I'll stick with using 1ms.
Melvin Smith
Learner.
Not sure if there's any way to not transition something but one way to do this is by applying a different transition duration to the property you wish to not animate.
That'd look something like this in your case:
transition: all 300ms ease, background-color 1ms;One thing to note here is that the transition duration mentioned for background-color is 1ms instead of 0 and that is because some browsers do not accept 0 as an acceptable parameter for duration. in our case though, while transition duration is of 1ms and not 0 but it does the trick :)