Hacker News new | past | comments | ask | show | jobs | submit login

Centering in CSS is "solved" problem if your "worst" browser to support is IE11. Flexbox does the job there.

However, there are still couple of common tasks that are pain/hard/impossible to do with just CSS.

Recently I learned that after all this years you still need to use JS to get css animation for dynamic height ("height:auto") of elements.

And there is no progress in fixing it at CSS standard level. It's just sad... https://github.com/w3c/csswg-drafts/issues/626 https://stackoverflow.com/questions/3508605/how-can-i-transi... https://stackoverflow.com/questions/3508605/how-can-i-transi...




There are some tricks you can use if you know the max possible height your element can have, but it's not great, yeah.

Edit: Oh, I just saw that the stackoverflow question you linked has this for the accepted answer :)


The problem is the animation speed is overly fast if you're at less than that maximum height.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: