The following worked for me:
.sample { padding: 20px; background-color: #efefef; transition: background-color 0.3s ease-in 0s; } .sample.active { background-color: green; transition-delay: 1s; }
You do not need a !important declaration because the cascade automatically prefers a later rule when overwriting a property.
You also do not need to rewrite the entire transition rule, since you specifically want to use the same transition with a different delay, and not with another transition.
The reason this happens (with a default delay of 0s ) is that when you remove the .active class .active you stop applying your color, as well as its transition delay, so the delay in the .sample class .sample applied.
source share