Yoast / yoast-components

Accessible React components by Yoast
GNU General Public License v3.0
21 stars 6 forks source link

Define default font stack #772

Open hedgefield opened 5 years ago

hedgefield commented 5 years ago

To standardize the use of fonts in our components, we should add a default font stack. It should not contain very many custom fonts, definitely not as the first choice, so we're using the same font stack that WordPress uses. You can read more about it here, including best practices.

It renders the default system font on Mac, which is San Francisco, then falls back to Segoe UI, the default Windows font, and so on through some other fallbacks for Android, Linux etc.

font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;

Prompted by https://github.com/Yoast/wordpress-seo/pull/11398#issuecomment-433986291 and also fixes https://github.com/Yoast/yoast-components/issues/582