Загрузка видео...

Не удалось загрузить видео

На главную

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,370 просмотров • 1 год назад •via X (Twitter)

Комментарии: 10

Фото профиля Pavel Ivanov
Pavel Ivanov1 год назад

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

Фото профиля jhey ▲🐻🎈
jhey ▲🐻🎈1 год назад

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

Фото профиля MGSimard
MGSimard1 год назад

Oh man inert is a thing? yoink

Фото профиля jhey ▲🐻🎈
jhey ▲🐻🎈1 год назад

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

Фото профиля Arthur
Arthur1 год назад

Bro is working on Vercel itself...

Фото профиля jhey ▲🐻🎈
jhey ▲🐻🎈1 год назад

🫡

Фото профиля Diogo
Diogo1 год назад

Didn't know about this inert attribute. Cool.

Фото профиля jhey ▲🐻🎈
jhey ▲🐻🎈1 год назад

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

Фото профиля Roo and Sashas Happy Days
Roo and Sashas Happy Days1 год назад

how does inert effect accessibility when using keyboard with these buttons

Фото профиля Typzo
Typzo1 год назад

Probably one of the best tricks grid has to offer!

Похожие видео