htmlcssuser-interfacecross-browser

CSS `height: calc(100vh);` Vs `height: 100vh;`


I'm working on a project where the former developer used:

.main-sidebar {
    height: calc(100vh);
}

I have no way to contact him/her anymore, and I would like to understand what is the difference (if any) between that and:

.main-sidebar {
    height: 100vh;
}

Solution

  • There's no difference, since any time the expression calc(100vh) is calculated, it always ends up being 100vh.