Created
May 20, 2024 19:33
-
-
Save ryanmorr/9c2198304c4bb0c0d7ba9f9f82aa355d to your computer and use it in GitHub Desktop.
Define a globally responsive font size relative to the viewport
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Courtesy of: https://jameshfisher.com/2024/03/12/a-formula-for-responsive-font-size/ */ | |
:root { | |
font-size: calc(1rem + 0.25vw); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment