Created
October 13, 2014 17:46
-
-
Save adamjgrant/efae92591ff2b511d48c to your computer and use it in GitHub Desktop.
Here's an easy way to scale up text responsively using CSS
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
html { | |
/* Use calc and the vh units to scale up text with screen size */ | |
font-size: calc(14px + 2vh); | |
} | |
/* Use rem units to size in multiples of the responsive size. */ | |
p { font-size: 1rem; } | |
h1 { font-size: 2rem; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment