codeAdrian / modern-fluid-typography-editor

Modern fluid typography editor

Home Page:https://modern-fluid-typography.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

an idea

Anunnaki26 opened this issue · comments

It would be better if the font size was calculated using a linear function in my opinion.
For example:
If the width of the container is 14rem then the font size should be 1rem. If the container is 60rem wide, then the font size should be 1.25rem.
Then you could calculate a linear function using the two points (14/1) and (60/1.25) and the font size should then change depending on the width of the container and the font size set by the user in the browser.
What do you say to this?

p {
font-size: calc((100cqi/280) + 17px) / 16 * 1rem;
}