You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm unfamiliar with vh/vw, but wanted to ask what the benefit is over something like rem? Is it just automatic, allowing you to avoid setting global font-size breakpoints?
vh and vw are proportionate to the width and height of the viewport.
1vw == window.document.width/100
rem is proportionate to the font-size of the html element.
1rem == $('html').css('font-size')
You can use rem to achieve a similar effect, as seen here,
but you would have to use javascript to set the font-size of the html element as a fraction of the window width.
vm is another cool unit. It's equal to 1% of the smaller of vw and vh.
vh/vw/vm are dynamic (at least in chrome, safari doesn't want to recalculate them on resize).
So they allow resizing on a spectrum rather than on discrete points.
This article has a hack to fix it.
http://css-tricks.com/viewport-sized-typography/
The text was updated successfully, but these errors were encountered: