Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

CSS sidebar tricks 🤌 transition expanded menu items to "auto" height using grid li > div[inert] { grid-template-rows: 0fr; } li > div { grid-template-rows: 1fr; transition: grid-template-rows .3s; }

117,372 görüntüleme • 1 yıl önce •via X (Twitter)

10 Yorum

Pavel Ivanov profil fotoğrafı
Pavel Ivanov1 yıl önce

yeah :) I use something close to this in react-scan! The old min/max-height hacks are no more!

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

yeah - solid solution until we get decent support for interpolate-size 🙏

MGSimard profil fotoğrafı
MGSimard1 yıl önce

Oh man inert is a thing? yoink

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

yep!🤙 so good for things where you need to hide from AT etc. but don't really want to use display none

Arthur profil fotoğrafı
Arthur1 yıl önce

Bro is working on Vercel itself...

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

🫡

Diogo profil fotoğrafı
Diogo1 yıl önce

Didn't know about this inert attribute. Cool.

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

super useful 💯 being able to hide things without juggling display none makes transitions so much easier 🙌

Roo and Sashas Happy Days profil fotoğrafı
Roo and Sashas Happy Days1 yıl önce

how does inert effect accessibility when using keyboard with these buttons

Typzo profil fotoğrafı
Typzo1 yıl önce

Probably one of the best tricks grid has to offer!

Benzer Videolar