Fit To Width Text

Using css only, containers/container queries, registered custom properties, by Roman Komarov. Works in the latest browsers as of july 2024, uses the font from kizu.dev as this one works in chrome and firefox as well as safari.

Simplest solution would be to use hand tweaked viewport units. Has better backward compatibility.

What if I will tell you how we could use registered custom properties (alongside container query length units and math) to solve fit-to-width text in all latest browsers?