▲ 0 r/Frontend
Search Bar Advice
Hey there everyone,
Does anyone have an advice for adapting your site to the mobile search bar on animation. Here is my problem:
On my site, I have a layer that contains multiple images, which takes up the full height of the site. Each image keeps a %height position set by a user. On desktop, this works fine, on mobile not so much.
When the mobile toolbar/search bar moves up and down it changes the page height. I've found you can use resize events, dvh, and visualViewport.height to change the height to match this site height change, but it is super janky/glitchy.
Does anyone on have any hacks they use to autoscale the height of a set of content on mobile search bar animation, smoothly?
u/hungrybularia — 13 hours ago