Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

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 Aufrufe • vor 1 Jahr •via X (Twitter)

10 Kommentare

Profilbild von Pavel Ivanov
Pavel Ivanovvor 1 Jahr

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

Profilbild von jhey ▲🐻🎈
jhey ▲🐻🎈vor 1 Jahr

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

Profilbild von MGSimard
MGSimardvor 1 Jahr

Oh man inert is a thing? yoink

Profilbild von jhey ▲🐻🎈
jhey ▲🐻🎈vor 1 Jahr

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

Profilbild von Arthur
Arthurvor 1 Jahr

Bro is working on Vercel itself...

Profilbild von jhey ▲🐻🎈
jhey ▲🐻🎈vor 1 Jahr

🫡

Profilbild von Diogo
Diogovor 1 Jahr

Didn't know about this inert attribute. Cool.

Profilbild von jhey ▲🐻🎈
jhey ▲🐻🎈vor 1 Jahr

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

Profilbild von Roo and Sashas Happy Days
Roo and Sashas Happy Daysvor 1 Jahr

how does inert effect accessibility when using keyboard with these buttons

Profilbild von Typzo
Typzovor 1 Jahr

Probably one of the best tricks grid has to offer!

Ähnliche Videos