I blug about #css again. Preventing an `!important` user agent style from kicking in with an infinite-duration transition https://noahliebman.net/2024/08/beating-important-user-agent-styles/
2 posts total
I blug about #css again. Preventing an `!important` user agent style from kicking in with an infinite-duration transition https://noahliebman.net/2024/08/beating-important-user-agent-styles/ @noleli I am so confused and undecided concerning how and where to start learning #JavaScript, and often ask myself if it is the right language to start learning, given my super limited time. Seeing this gets me even more worried. |
@noleli I’m assuming this works, because the user specified styles get applied first, because the !important of the user agent stylesheet makes it kick in last? And that’s how the initial state of the transition is set?
I never thought of !important styles being applied *after* regular ones in a “time” sense. 😅
@noleli Ha ha ha, super nice trick. I didn’t know about `infinity` for CSS transition.
@noleli would it be a bit cleaner to set the transition-delay to infinity instead of the transition-duration? Of course the result should be the same but that would remove the need to specify the timing function I think.