Tweet by @jh3yy
Now CSS has JavaScript's Math.pow(), you could generate fluid font scales in CSS for viewport/container sizes 👀 (watch resize)
:where(dd) {
--min: calc(17 * pow(1.2, var(--lvl, 0)));
font-size: clamp(var(--min), var(--fluid), var(--max)); ✨
}
dd:nth-of-type(2) { --lvl: 2; } https://t.co/pImcdembft
— jhey ▲🐻🎈 (@jh3yy)
May 29, 2024