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

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

На главную

👀 An early look at transitioning to and from `display: none` in CSS 👀

269,230 просмотров • 3 лет назад •via X (Twitter)

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

Фото профиля Una 🇺🇦
Una 🇺🇦3 лет назад

Youtube link if you prefer:

Фото профиля Maximilien Monteil 🇵🇸
Maximilien Monteil 🇵🇸3 лет назад

This is amazing! Would it include animating smth like height to and from `auto`?

Фото профиля Una 🇺🇦
Una 🇺🇦3 лет назад

Unfortunately no, not yet at least

Фото профиля trash
trash3 лет назад

finally

Фото профиля Kent C. Dodds 🌌
Kent C. Dodds 🌌3 лет назад

Solving real problems over here 🔥

Фото профиля Jeuri
Jeuri3 лет назад

This is awesome. So happy this is going to be a thing.

Фото профиля Z 🏴‍☠️
Z 🏴‍☠️3 лет назад

Oooh

Фото профиля François REMY
François REMY3 лет назад

Duplicating your styles in @ initial sounds awkward and error-prone. I would rather have the browser compute the styles even when hidden if display is in the transitionable properties or in will-chage: display.

Фото профиля Enrico Gruner 🔥
Enrico Gruner 🔥3 лет назад

"Upcoming CSS capability" can you share a link to the spec? 🤤

Фото профиля Joe Vans
Joe Vans3 лет назад

Can you dive a little deeper into what is happening prior to this flag change? Is it as simple as "display:none is in the wrong priority compared to transitions so there for display:none changes after the transitions"?

Фото профиля Una 🇺🇦
Una 🇺🇦3 лет назад

Right, if you animate to `display: none` now, it'll apply immediately and won't be a part of the transition. Additionally, there's no way to specify what the pre-animation states are when animating *from* it

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