Last active
July 8, 2019 16:16
-
-
Save jasonroot/925fc8c45533812a4bdf4fd3f8f477ac to your computer and use it in GitHub Desktop.
font scaling
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
/// fonts | |
html, | |
body { | |
font-size: 14px !important; | |
} | |
h1 { | |
font-size: 1.602em; | |
} | |
h2 { | |
font-size: 1.424em; | |
} | |
h3 { | |
font-size: 1.266em; | |
} | |
h4 { | |
font-size: 1.125em; | |
} | |
h5 { | |
font-size: 0.889em; | |
} | |
h6 { | |
font-size: 0.79em; | |
} | |
/// fonts for medium devices (tablets, 48em and up) | |
@media (min-width: 48em) { | |
h1 { | |
font-size: 2.441em; | |
} | |
h2 { | |
font-size: 1.953em; | |
} | |
h3 { | |
font-size: 1.563em; | |
} | |
h4 { | |
font-size: 1.25em; | |
} | |
} | |
/// fonts for large devices (desktops, 64em and up) | |
@media (min-width: 64em) { | |
html, | |
body { | |
font-size: 16px !important; | |
} | |
} | |
/// fonts for extra large devices (large desktops, 76.5em and up) | |
@media (min-width: 76.5em) { | |
html, | |
body { | |
font-size: 18px !important; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment