Leading Line Height adjusting issue
Hello, question everyone. How can I fix this in my hero, like when I zoom out, his line height adjusting like this in the video.
7 Replies
this my code, I am using tailwind. thank you!
I don’t use tailwind but the leading (space bw text, different than line-height) is set to 7vh. I guess when you zoom out the vh is calculated differently. I would use a different unit than vh, maybe cap or ex or lh (or if you want relative rcap, rex, rlh)
Learning something new everyday! I always thought 100vh/vw was static and based on the devices browser height/width but the viewport and the browser height/width is not the same thing. This site tells you your viewport size , try zooming in and out here.
https://whatismyviewport.com/
So your viewport height is getting larger so the leading looking at 7vh has a larger number to account for when zooming out.
What is my viewport
What Is My Viewport — A simple online tool for quickly finding the dimensions of your current device's viewport!
ow thanks for this mate, I will try what u said. Thank you, I am also still learning hehe
hi @hart❤🔥 thank you btw, I am good with my hero main now thanks a lot