Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

๐Ÿ‘€ An early look at transitioning to and from `display: none` in CSS ๐Ÿ‘€

269,212 Aufrufe โ€ข vor 3 Jahren โ€ขvia X (Twitter)

11 Kommentare

Profilbild von Una ๐Ÿ‡บ๐Ÿ‡ฆ
Una ๐Ÿ‡บ๐Ÿ‡ฆvor 3 Jahren

Youtube link if you prefer:

Profilbild von Maximilien Monteil ๐Ÿ‡ต๐Ÿ‡ธ
Maximilien Monteil ๐Ÿ‡ต๐Ÿ‡ธvor 3 Jahren

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

Profilbild von Una ๐Ÿ‡บ๐Ÿ‡ฆ
Una ๐Ÿ‡บ๐Ÿ‡ฆvor 3 Jahren

Unfortunately no, not yet at least

Profilbild von trash
trashvor 3 Jahren

finally

Profilbild von Kent C. Dodds ๐ŸŒŒ
Kent C. Dodds ๐ŸŒŒvor 3 Jahren

Solving real problems over here ๐Ÿ”ฅ

Profilbild von Jeuri
Jeurivor 3 Jahren

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

Profilbild von Z ๐Ÿดโ€โ˜ ๏ธ
Z ๐Ÿดโ€โ˜ ๏ธvor 3 Jahren

Oooh

Profilbild von Franรงois REMY
Franรงois REMYvor 3 Jahren

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.

Profilbild von Enrico Gruner ๐Ÿ”ฅ
Enrico Gruner ๐Ÿ”ฅvor 3 Jahren

"Upcoming CSS capability" can you share a link to the spec? ๐Ÿคค

Profilbild von Joe Vans
Joe Vansvor 3 Jahren

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"?

Profilbild von Una ๐Ÿ‡บ๐Ÿ‡ฆ
Una ๐Ÿ‡บ๐Ÿ‡ฆvor 3 Jahren

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

ร„hnliche Videos