It appears that by using calc() and vw we can get responsive typography that scales perfectly between specific pixel values within a specific viewport range.
The problem with the common approach to responsive typography is that it is jumpy and requires a lot of media queries.
Viewport units are fluid but lack precise control over font-size.
Typically you might use a table like this to work out the range of font sizes across different resolutions.
|Viewport size||font-size in pixels|
Looking at the table you can see there are many limitations. There is no way to scale between 16px and 36px for example over the given viewport sizes. That is a shame because this is the type of control designers expect (and should expect).
Imagine you want the smallest font-size to be 12 pixels and then once the device width is greater than 400px you want the font-size to gradually increase to 24px and stop scaling by the time the viewport reaches 800px. That is exactly what this demo does!
This is achieved by using viewport units in combination with calc().
More details here: https://madebymike.com.au/writing/precise-control-responsive-typography/
Get the SCSS mixin: https://codepen.io/MadeByMike/pen/vNrvdZ
See all examples in the collection: https://codepen.io/collection/nLbRMZ
Read about it on Smashing: https://www.smashingmagazine.com/2016/05/fluid-typography/