Issue with initial opacity transition with navbar on responsive design

I have set toggle opacity and hidden transitions on the navbar its working properly. But theirs an issue when resizing the window screen when the @media query gets hit. It starts with 100% opacity and then auto starts the transition to 0% and hidden. It's suppose to start hidden and 0 opacity. But it's not. I'm guessing that when the @media query get his it adds the class and its default is 100% opacity and shown. And then goes to its set. https://codepen.io/fernandojcastellanos/pen/ZEoxdQw
2 Replies
Kevin Powell
Kevin Powell•3y ago
The easiest solution is probably a resize observer that sets the transition-duration to 0 seconds while things are changing Also, I see that your transitioning visiblity. You can't really transition that, it's either one or the other, if I remember right, so it's not really doing anything 🙂
lalo salamanca
lalo salamancaOP•3y ago
I see, I watched the video havnt implemented it yet, perfect time to try. Ty! hahahah damn ty!
Want results from more Discord servers?
Add your server