Lorem ipsum dolor sit, amet consectetur adipisicing elit. Eius quidem voluptatum nihil sequ excepturi dignissimos vero aperiam modi debitis ex neque aspernatur dolorum?
Resize the base font-size accordingly to the viewport size. Start with 1.6rem and reach a max of 2.2rem./* get an easy math for rem units */
html { font-size: 62.5%; }
body { font-size: 1.6rem; }
/* where the magic happens */
@media (min-width: 320px) {
body {
font-size: calc(1.6rem + 6 * ((100vw - 320px) / 680));
}
}
@media (min-width: 1000px) {
body {
font-size: 2.2rem;
}
}
Read more
about fluid typography, and take a look at
this
codepen.