Skip to content

Instantly share code, notes, and snippets.

@ricardozea
Last active July 16, 2018 03:04
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 ricardozea/ab8cc9e90ffcb963d0d339146a0cdd76 to your computer and use it in GitHub Desktop.
Save ricardozea/ab8cc9e90ffcb963d0d339146a0cdd76 to your computer and use it in GitHub Desktop.
Dynamic Font Size and Line Height using calc(). Demo: https://codepen.io/ricardozea/pen/dbba1a4efcf515f05e36b5d4223aa6ab
p {
font-size: calc(2vw + .3em); //edit
line-height: calc(1vw + 1.2em); //edit
@media (min-width: 1000px) {
line-height: 1.5; //edit
}
}
/*
Demo: https://codepen.io/ricardozea/pen/dbba1a4efcf515f05e36b5d4223aa6ab
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment