Dear community
I need your help to get a smooth transition in the logo size when the user scrolls the page and the header is sticky. I’ve done it several times but this is the first time in Bricks and it does not work.
Please take a look at this link. As you can see the transition in the size is not working
It’s always difficult to change height: auto to height with pixels with transition in CSS.
Try to use max-height instead. Plus, you define transition in the wrong place. The logo element consists of a parent link a and img. You change size of img, but defined transition for link.
Here is a fixed code:
header.sticky %root% img {
height: auto;
transition: .4s ease; // added transition to img element
max-height: 250px; // any value bigger than logo size
}
header.sticky.scrolling %root% img {
max-height: 50px;