The Dangers Of Using VW/VH For Font-Size.
<p>The semi-new “viewport” based measurements of VW (viewport width) and VH (viewport height) has given us a powerful tool for resizing elements. These metrics are a godsend in cases where a desktop font for a header is too large, or if you want to scale down the outer padding of a page to better fit smaller screens.</p>
<p>However they come with one devil of a sticky wicket. No matter how much you zoom in or out, a percentage of viewport width <strong>does not change! </strong>It is thus using vw or vh raw on font size has major problems.</p>
<p>I’ve made this demo to show it. I’ve made two elements, a heading and a paragraph. The paragraph uses 2VW, the heading has 4VW clamped between 1.5rem and 3rem.</p>
<p><a href="https://medium.com/@deathshadow/the-dangers-of-using-vw-vh-for-font-size-39466a05bc02"><strong>Read More</strong></a></p>