Bonafide CSS trick alert! Nelson Menezes found out a brand new means (that solely works in Firefox for now) that’s awfully intelligent.
Maybe you realize that CSS can not animate to auto dimensions, which is tremendous unlucky. Animating from zero to “no matter is critical” could be very useful fairly often. We’ve documented the out there methods. They boil all the way down to:
Nelson’s method is neither of these, nor some transform-based means with visible awkwardness. This system makes use of CSS Grid at its core…
Unbelievably, in Firefox, that transitions content material inside that space between 0 and the pure peak of the content material. There may be solely a little bit extra to it, like hiding overflow and visibility to make it look proper whereas sustaining accessibility:
CodePen Embed Fallback
That’s fantastic. Let’s get some stars on this difficulty and possibly Chrome will decide it up. However in fact, even higher could be if auto peak transitions simply began working. I can’t think about that’s completely exterior the realm of risk.
At Marketing Solution Australia we strive to deliverer elegant responsive websites for your business integrated with our personal SEO Optimization package to bring your pages on the first page of Google.