A logarithm asks for the exponent that turns a base into a number. In log(8, 2) = 3, the base 2 raised to 3 produces 8. CSS log(x, base) makes that calculation available inside CSS math expressions. section 3.2.4
Logarithmic growth is useful when each additional step should increase a value more gently than the previous one. A font scale can add one to a step, take its logarithm, then multiply the result by 1rem.
A logarithmic type scale
Set --step on each heading and use font-size: calc((log(var(--step) + 1) + 1) * 1rem). Steps 0 through 12 produce a graduated heading scale while preserving a 1rem base size.


