It won't be perfect, but using media queries may come close.
@media screen and (max-height: 50px) { body { font-size: 7.5px; } } @media screen and (max-height: 100px) { body { font-size: 15px; } } @media screen and (max-height: 150px) { body { font-size: 22.5px; } } @media screen and (max-height: 200px) { body { font-size: 30px; } }
Etc. You will need to determine when you need to make a βbreakβ point and how far you can take it at the low and high end.
source share