Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

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

269,230 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