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 :)