Continuous Typography
maxkoehler.com
maxkoehler.com
I was wondering how "discretely" to inform him of this.
As mentioned in some other comment, a constant function is continuous but is obviously not what the article is about.
Nowadays the default way to do zooming is to pretend the entire page is being rendered at a different resolution than the real screen. You can view this in action by typing "window.screen" in your browser console, zooming, then checking that variable again (in Chrome check window.visualViewport).
Pretending here means the browser (if it's Firefox) lies to JavaScript and when computing the layout, but then scales pixel values back to real screen values before rendering. That's why stuff generally won't look pixelated[1].
[1]: A notable exception is canvas elements. Since a script may decide to use a lower resolution for them.
Being able to supply any other units is a misfeature, in my opinion.
The demo isn't a representation of a productionised end product. It is a playground representating the findings of the authors article for desktop users; it simulates a dynamic window which you can resize using your mouse - so the demo not functioning properly on mobile seems acceptable.
Like, Adobe XD (to take one prototyping tool) doesn't work on mobile. You can view the end prototype on a mobile device, but the tool itself does not work in that environment, and it would make no sense for it to, the environment is too restrictive.
Https://magicseth.com/
Is not valid in Firefox!
The clamp() examples here mitigate that somewhat, but why do we need fluid shifts in text size? Just use media queries.
I think the more interesting thing we should work towards is achieving metric typography—not just converting to millimetres, but actually measuring font-size based on x-height rather than total height.
For example, if you have a blog site, you probably want to have your content in one column with line lengths around, say, 50-70 characters. This is because very long lines are difficult to keep track of and short lines tire your eyes. But you also want your content to fill the screen.
If we had some kind of a constraint solver in CSS, you could say something like that and have the stylesheet resolve into something that changes the font size based on the viewport width, because that's the undetermined variable when you fix line length and box width. However, we don't have that, so the author instead has to explicitly say, "make the font size 1% the width of the viewport".
I suppose this approach could be used together with the METAFONT approach so that the font itself varies as needed, too.... but my head hurts thinking about it.
I did the same, and I am still amazed at how impressively you can break website UIs with this simple setting. Want to absolutely wreck a modern responsive web app built by a billion-dollar IT corporation? Deny it custom fonts and everything comes crashing down: