Last active
August 29, 2020 20:48
-
-
Save devwax/7fe0167b10caaaf83fbddce36027a2eb to your computer and use it in GitHub Desktop.
CSS Calc() Snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* https://css-tricks.com/simplified-fluid-typography/ */ | |
.responsive-font { | |
font-size: calc(2.26278rem + 2.24562*(100vw - 36rem)/39); | |
} | |
html { | |
font-size: 16px; | |
} | |
@media screen and (min-width: 320px) { | |
html { | |
font-size: calc(16px + 6 * ((100vw - 320px) / 680)); | |
} | |
} | |
@media screen and (min-width: 1000px) { | |
html { | |
font-size: 22px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment