coderef

UI fontsLimited availability

The ui-serif, ui-sans-serif, ui-monospace and ui-rounded values for the font-family CSS property use device-default user interface fonts for text.

Not yet supported in all major browsers — check the table and provide a fallback.

Browser support

DesktopChrome
✕Not supportedup to 155
Current: 155
Edge
✕Not supportedup to 154
Current: 154
Firefox
✕Not supportedup to 157
Current: 157
Safari
1–13Not supported
13.1+Supportedsince Mar 24, 2020
Current: 27
MobileChrome Android
✕Not supportedup to 155
Current: 155
Firefox Android
✕Not supportedup to 157
Current: 157
Safari iOS
1–13Not supported
13.4+Supportedsince Mar 24, 2020
Current: 27

How to use

Not supported in Chrome, Edge, Firefox, Chrome Android, Firefox Android. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN — see the links below.

Feature detection

CSS · check before using
@supports (font-family: ui-monospace) {
  /* styles that rely on font-family: ui-monospace */
}

/* or in JavaScript */
if (CSS.supports("font-family", "ui-monospace")) {
  // use it
}

Sub-features

Support for each part of the feature (4). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
font-family.ui-monospace✕✕✕13.1✕✕13.4
font-family.ui-rounded✕✕✕13.1✕✕13.4
font-family.ui-sans-serif✕✕✕13.1✕✕13.4
font-family.ui-serif✕✕✕13.1✕✕13.4