Skip to content

Instantly share code, notes, and snippets.

@everdimension
Last active February 16, 2019 18:12
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 everdimension/1d7bf07a4e6b4b3886e778f64a6a55c3 to your computer and use it in GitHub Desktop.
Save everdimension/1d7bf07a4e6b4b3886e778f64a6a55c3 to your computer and use it in GitHub Desktop.
Css rule for setting the "Native Font stack" or "system font".
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