Y

YouLibs

Remove Touch Overlay

Animate from display none

Duration: 21:55Views: 55KLikes: 2.6KDate Created: Apr, 2022

Channel: Kevin Powell

Category: Education

Tags: cssanimate display nonecss animationkevin powellcss transitiontransition display noneanimationtransition display propertypopup modaldialogdisplay cssanimate display propertyhtmltutorialcss display nonefront-endfrontendmodal

Description: A common problem people ask me about is animating from, or to display: none, since it's not an animatable property. After making my recent video on the dialog element, I got a lot of questions about animating it in and out, and it just so happens to use `display: none` when it's closed, so I saw it as a good opportunity to take a look at it. 🔗 Links ✅ The video on the dialog element: youtu.be/TAB_v6yBXIE ✅ The CodePen: codepen.io/kevinpowell/pen/QWaBeGm ✅ Open Props: open-props.style ✅ Video introducing Open Props: youtu.be/szPNMKZazzQ ⌚ Timestamps 00:00 - Introduction 01:32 - What we're starting with 01:59 - Adding the animation on open 02:52 - The problem with backdrop 03:53 - Getting the backdrop to fade in 04:31 - Why it's easy to animate on open but not on close 05:28 - A quick fix for animating the close 06:37 - the problems with this solution 08:37 - Making a "closing" state 09:15 - Making the closing state work 14:06 - The problem with different animations on close 15:01 - Closing when we click outside the modal 19:36 - fixing the backdrop shadow effect #css -- Come hang out with other dev's in my Discord Community 💬 discord.gg/nTYCvrK Keep up to date with everything I'm up to ✉ kevinpowell.co/newsletter Come hang out with me live every Monday on Twitch! 📺 twitch.tv/kevinpowellcss --- Help support my channel 👨‍🎓 Get a course: kevinpowell.co/courses 👕 Buy a shirt: teespring.com/stores/making-the-internet-awesome 💖 Support me on Patreon: patreon.com/kevinpowell --- My editor: VS Code - code.visualstudio.com --- I'm on some other places on the internet too! If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter. Twitter: twitter.com/KevinJPowell Codepen: codepen.io/kevinpowell Github: github.com/kevin-powell --- And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!

Swipe Gestures On Overlay