Skip to content

Instantly share code, notes, and snippets.

@alexmustin
Last active August 12, 2020 01:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexmustin/dc3317e189626854797061db2b17b1b1 to your computer and use it in GitHub Desktop.
Save alexmustin/dc3317e189626854797061db2b17b1b1 to your computer and use it in GitHub Desktop.
CSS - Responsive Body and Header font sizes
body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-size: calc(.35vw + 1rem);
line-height: 1.8;
}
h1 {
font-size: calc(2.0vw + 1rem);
}
h2 {
font-size: calc(1.66vw + 1rem);
line-height: 1.3216;
}
h3 {
font-size: calc(.8vw + 1rem);
}
h4 {
font-size: calc(.66vw + 1rem);
}
h5 {
font-size: calc(.5vw + 1rem);
}
h6 {
font-size: calc(.4vw + 1rem);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment