Skip to content

Instantly share code, notes, and snippets.

@halofx
Last active January 30, 2017 22:28
Show Gist options
  • Select an option

  • Save halofx/d4846248304b8161644dbda0c8cefcad to your computer and use it in GitHub Desktop.

Select an option

Save halofx/d4846248304b8161644dbda0c8cefcad to your computer and use it in GitHub Desktop.
CSS based Molten Leading technique. by Mike Riethmuller, adapted from Wilto. Found from a CSS-Tricks email.
.molten-leading {
line-height: 1.2em;
}
@media screen and (min-width: 20em) {
.molten-leading {
line-height: calc(1.2em + 0.6 * ((100vw - 20em) / 60));
}
}
@media screen and (min-width: 80em) {
.molten-leading {
line-height: 1.8em;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment