Skip to content

Instantly share code, notes, and snippets.

@sheppardjm
Created February 6, 2022 13:56
Show Gist options
  • Save sheppardjm/ba7ba0a0fa4c5b5e590fb34509f3e420 to your computer and use it in GitHub Desktop.
Save sheppardjm/ba7ba0a0fa4c5b5e590fb34509f3e420 to your computer and use it in GitHub Desktop.
h1 {
/* font-size: clamp(min, ideal, max); */
font-size: clamp(20px, 10vw, 200px);
}
/* Set ideal in vw to tie font size to browser width (i.e. 1000px wide == font-size: 100px */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment