What if I will tell you how we could solve fit-to-width text with pure #CSS without any hardcoded parameters? Curiously, scroll-driven animations will allow us to do just that!

Welcome my new article — “Fit-to-Width Text” — where I continue exploring the experimental implementations of the latest specs.

https://kizu.dev/fit-to-width-text/

Fit-to-Width Text

What if I will tell you how we could solve fit-to-width text with pure CSS without any hardcoded parameters? Curiously, scroll-driven animations will allow us to do just that! Join me as I continue exploring the experimental implementations of the latest specs.

@kizu you can use textLength and lengthAdjust to do this with SVG text, but it only has spacing and spacingAndGlyphs options - adding new options for font-size or the width axis of a variable font would be interesting.