Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

Future CSS Tip! 🔮 Anchor Positioning lets you anchor elements to others with CSS alone 👍 It can also work out positioning if an element gets clipped by a container, window, etc. Think "Common floating UI uses with no JS" 🤯 .el { bottom: anchor(--link top); } Just CSS 👇

160,545 görüntüleme • 3 yıl önce •via X (Twitter)

10 Yorum

jhey ▲🐻🎈 profil fotoğrafı
jhey ▲🐻🎈3 yıl önce

If you want to see this demo in action, here's the @CodePen link! 🤙 You'll need to be in Chrome Canary with the "Experimental Web Platform Features" flag enabled ⛳️ This one anchors Popovers using the Popover API 😎

jhey ▲🐻🎈 profil fotoğrafı
jhey ▲🐻🎈3 yıl önce

And here's an article I put together all about Anchor Positioning that looks into some of the main parts of this CSS API 👀

Andreas Eracleous profil fotoğrafı
Andreas Eracleous3 yıl önce

This is great! tip! thanks you for sharing

jhey ▲🐻🎈 profil fotoğrafı
jhey ▲🐻🎈3 yıl önce

It'll be pretty cool when/if it lands in other browsers! 💯

blah profil fotoğrafı
blah3 yıl önce

Unrelated question but when is it the right time to implement these new css features? Browser support can widely vary and many systems will still run old browser version so what's the recommended way to go about this?

AellL profil fotoğrafı
AellL3 yıl önce

@SaveToNotion #thread #css

Shripal Soni profil fotoğrafı
Shripal Soni3 yıl önce

Wow! This will be really very helpful 🤩

Marina Luna profil fotoğrafı
Marina Luna3 yıl önce

🤯!

Erik Rasmussen 👨‍💻🇺🇸🇪🇸 profil fotoğrafı
Erik Rasmussen 👨‍💻🇺🇸🇪🇸2 yıl önce

Whoa…

Joshua Riley profil fotoğrafı
Joshua Riley2 yıl önce

A @tailwindcss version of this would be amazing

Benzer Videolar