Loading video...

Video Failed to Load

Go Home

Spoiler: It's a stack of empty elements using CSS backdrop-filter: blur() with varying strengths/mask 🤙

275,529 views • 2 years ago •via X (Twitter)

10 Comments

Mery's profile picture
Mery2 years ago

If you ever drop a course it'll be the fastest one I'll ever buy. This is so sick

jhey ▲🐻🎈's profile picture
jhey ▲🐻🎈2 years ago

It will happen 💯 After Figma Config, I'll start thinking about physical book && course properly 🤙

Florian's profile picture
Florian2 years ago

LOL this wasn’t the codepen I used as initial template but this is so sick! Didn’t know something like that already existed in almost the same way

jhey ▲🐻🎈's profile picture
jhey ▲🐻🎈2 years ago

No problem! 🙏 Didn't think it was my pen you'd used. Jus' reminded me I'd made it 😅 Wasn't angling at the blur in this demo but it was requested. It was more about creating the effect without duplicating the elements 🤙 Prefer the color in yours! 💯

sreejith's profile picture
sreejith2 years ago

One of my favourite codepen of yours! :D

Ayush Sharma's profile picture
Ayush Sharma2 years ago

Close the tabs pls.

Michael Adrian's profile picture
Michael Adrian2 years ago

Would you roast my CSS micro-interactions as well? 😆

jhey ▲🐻🎈's profile picture
jhey ▲🐻🎈2 years ago

Haha – Not roasting. I prefer the design of @flornkm's tbh. I'm jus' out here sharing the ways. Plus reminds me of things to squeeze into my Config talk 🙌😅

Shay Yaakov's profile picture
Shay Yaakov2 years ago

Unrelated but how did you record this video? 😆

jhey ▲🐻🎈's profile picture
jhey ▲🐻🎈2 years ago

With @screenstudio 🎬

Related Videos

CSS Trick! 🤙 You can create gradient borders on translucent elements using mask-clip and mask-composite with a pseudo-element 🔥 .gradient-border::after { mask-clip: padding-box, border-box; mask-composite: intersect; mask: linear-gradient(transparent, transparent), linear-gradient(white, white); } It's the same "Transparent border trick" from before. But, now you apply it to a pseudo-element 😎 The trick is to create a pseudo-element with a gradient background and then mask it so we only see the part we want, the border ✨ mask-clip defines the area affected by a mask. Similar to how you can define background-size. Using padding-box and border-box constrains the two masks. mask-composite is the magic part ✨ It defines a compositing operation for stacked mask layers. Using intersect means that the parts that overlap get replaced. And this seems to work in all browsers 🙌 As for the rest of the styles... – Make sure you set pointer-events: none on the pseudo-element – Make sure it fills the parent element. You can use position: absolute and inset: 0 – Make sure the background fills the space including the border-width. You can use calc to achieve that: --bg-size: calc(100% + (2px * var(--border))); background: var(--gradient) center center / var(--bg-size) var(--bg-size); That's it! 🚀 Gradient borders on translucent elements. You can set all the backdrop-filter: blur() you like! 😅 CodePen.IO link below! 👇

jhey ʕ•ᴥ•ʔ

269,739 views • 2 years ago