question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`font-family: system-ui;` support

See original GitHub issue

See https://github.com/Fyrd/caniuse/issues/2918 for caniuse feature inclusion.

It would be nice if autoprefixer replaced font-family: system-ui; with this:

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

(adapted from https://www.smashingmagazine.com/2015/11/using-system-ui-fonts-practical-guide/ )

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:9
  • Comments:17 (11 by maintainers)

github_iconTop GitHub Comments

7reactions
ausicommented, Dec 29, 2016

I think extending system-ui to the complete font list from above can be problematic. There is not “the one” list that is correct IMO, it’s just a best practice for now and may be different depending on the user base. The linked Smashing Magazine article itself notes that “this is not future-proof” and “The list targets the most popular browsers and operating systems, but it doesn’t target all of them”.

I think it would be nice if autoprefixer extends system-ui to only system-ui, -apple-system, BlinkMacSystemFont which are all equivalent AFAIK and that would be some kind of “prefixing”. The list of fallback fonts should be up to the CSS author (or to cssnext).

6reactions
yisiblcommented, Dec 30, 2016

I think autoprefixer should only deal with the prefix and private value.

Input:

font-family: system-ui, sans-serif;

Output:

font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
Read more comments on GitHub >

github_iconTop Results From Across the Web

system-ui value for font-family | Can I use... Support tables ...
Value for font-family that represents the default user interface font. Usage % of. all users, all tracked, tracked desktop, tracked mobile.
Read more >
Browser Compatibility of system-ui value for font-family
system-ui value for font-family on Android Browser is fully supported on 97-103, partially supported on None of the versions, and not supported ......
Read more >
Never, ever use system-ui as the value of font-family
Bottom line: never, ever use system-ui as the value of the font-family CSS property or part of it. At least never use it...
Read more >
"system-ui" generic font family
This generic font family allows authors to style contents so it fits within the system UI. Specification. Specification link.
Read more >
font-family - CSS: Cascading Style Sheets - MDN Web Docs
The font-family CSS property specifies a prioritized list of one or more font family names and/or generic family names for the selected ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found