Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've never had a designer tell me "if x typeface isn't available, fallback to y." Simply fall back to the generic name unless specified.

Why does "Monospace Code" begin with a generic name (`ui-monospace`) instead of ending with one?

(Well done demo, thanks for sharing!)



`ui-monospace` is an extended system font property [1] similar to `system-ui` that is currently only supported in Safari. This will render SF Mono on macOS and iOS [2].

[1] https://caniuse.com/extended-system-fonts

[2] https://github.com/system-fonts/modern-font-stacks#monospace...


It's also a generic value, like `sans-serif` that typically comes at the end of a stack. If someone has Consolas installed why show them something else only on Safari?

https://developer.mozilla.org/en-US/docs/Web/CSS/font-family...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: