CTO and co-founder of Signal Sciences. Author and speaker on software engineering, devops, and security.

CSS System Font Stack Sans Serif v1

The native font stack attempts to use the sans serif font used by the operating system in user interfaces.

This is best for buttons and other UI elements on the page, but it also works for body text.

The CSS

/* 1: Safari/Mac special, BlinkMac is the current
 *    Chrome method for using the macOS system font
 * 2: Recent windows
 * 3: Older Macs,
 * 4: system default,
 */
font-family:
  /* 1 */ -apple-system, BlinkMacSystemFont,
  /* 2 */ "Segoe UI",
  /* 3 */ Helvetica Neue,
  /* 4 */ sans-serif;

This is what it looks like on your browser:

THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG.
The quick brown fox jumped over the lazy dog.
0123456789
11111.11
88888.88
0Oo il1I! Z2z 8$s5S😺‼✏⚠😭⤴⤵

References

The Fonts

If a font does not exist on your system, it will be rendered in a monospace font.

-apple-system

This is the macOS or iOS system font, when using Safari.

THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG.
The quick brown fox jumped over the lazy dog.
0123456789
11111.11
88888.88
0Oo il1I! Z2z 8$s5S😺‼✏⚠😭⤴⤵

BlinkMacSystemFont

This is the macOS or iOS system font, when using Chrome.

THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG.
The quick brown fox jumped over the lazy dog.
0123456789
11111.11
88888.88
0Oo il1I! Z2z 8$s5S😺‼✏⚠😭⤴⤵

Segoe UI

Segoe has been the system font for Windows since Vista, circa 2006.

THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG.
The quick brown fox jumped over the lazy dog.
0123456789
11111.11
88888.88
0Oo il1I! Z2z 8$s5S😺‼✏⚠😭⤴⤵

Helvetica Neue

Helvetica Neue is an optimization of Helvetica (Fonts.com has a nice write up on the differences). It’s likely to be 100% present on macOS and iOS, but also missing completely on Windows (which uses the clone Arial). There is no reason not to use Helvetica Neue instead of plain Helvetica.

THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG.
The quick brown fox jumped over the lazy dog.
0123456789
11111.11
88888.88
0Oo il1I! Z2z 8$s5S😺‼✏⚠😭⤴⤵

sans-serif (default)

OS Default sans-serif font
Windows Arial
macOS, iOS Helvetica
Android Roboto

THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG.
The quick brown fox jumped over the lazy dog.
0123456789
11111.11
88888.88
0Oo il1I! Z2z 8$s5S😺‼✏⚠😭⤴⤵

webdev

© 2018 Nick Galbreath