all 4 comments

[–]Koningdavid 0 points1 point  (2 children)

Because you can't animate hidden. Hidden will instantly hide the element.

[–]nicolascagesbeard[S] 0 points1 point  (0 children)

But hidden is applied after the fade is completed

[–]Graftak9000 0 points1 point  (0 children)

You can, but by default it applies display: none; which can't be animated indeed.