DEV Community

khushal
khushal

Posted on

Why we use dvh, dvw, svh, svw, lvh, lvw instead of traditional vh and vw ?

## Problem in vh: By default, the vh unit includes the address bar that comes with a mobile browser.

problem in vh

The solution of this problem lead to new units.

You can understand solution through below image.

solution of problem

Top comments (3)

Collapse
 
almazbisenbaev profile image
Almaz Bisenbaev

First we got vh, then we invented svh to fix vh, then we invented lvh and dvh to fix svh ☠️

Collapse
 
dotallio profile image
Dotallio

I used to run into so many layout bugs from vh on mobile, glad the new units finally address it. Are you already using dvh/lvh/svh in production?

Collapse
 
khushal_satani profile image
khushal

yes