Skip to content

Instantly share code, notes, and snippets.

@adamjgrant
Created October 13, 2014 17:46
Show Gist options
  • Save adamjgrant/efae92591ff2b511d48c to your computer and use it in GitHub Desktop.
Save adamjgrant/efae92591ff2b511d48c to your computer and use it in GitHub Desktop.
Here's an easy way to scale up text responsively using CSS
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