Last active
February 16, 2019 18:12
-
-
Save everdimension/1d7bf07a4e6b4b3886e778f64a6a55c3 to your computer and use it in GitHub Desktop.
Css rule for setting the "Native Font stack" or "system font".
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
body { | |
font-family: | |
/* Safari for OS X and iOS (San Francisco) */ | |
-apple-system, | |
/* Chrome >= 56 for OS X (San Francisco), Windows, Linux and Android */ | |
system-ui, | |
/* Chrome < 56 for OS X (San Francisco) */ | |
BlinkMacSystemFont, | |
/* Windows */ | |
"Segoe UI", | |
/* Android */ | |
"Roboto", | |
/* Basic web fallback */ | |
"Helvetica Neue", Arial, sans-serif; | |
} | |
/* based on ideas from https://www.smashingmagazine.com/2015/11/using-system-ui-fonts-practical-guide/ */ | |
/* another approach worth checking out which uses @font-face declaration https://github.com/jonathantneal/system-font-css/blob/f40d7260df72a27e5c917604727dfee048764900/system-font.css | |
* so you could just use `font-family: 'system';` anywhere | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment