You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@vitalyster the intent of that suggestion is understood and fine, but i want to point out that the actual implementation of that would not achieve the goal.
using your example of github, we see:
# the winning declaration for your comment
.markdown-body {
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
}
# further up the stack
body {
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
}
# different variables are defined, but none of these would achieve
# the goal of "using the system font" to enable both you and i to
# have a monospace and non-monospace font rendered in the web ui.
:root {
--fontStack-monospace: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
--fontStack-sansSerif: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
--fontStack-sansSerifDisplay: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
--fontStack-system: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}
what we really need is support for letting the user pick.
I'm just pointing out that when user asks "please allow to change font" it means "your default font is wrong" :) If you will set up system font stack nobody will complain about wrong font and will not try to change it (because user can always change default font in the browser itself)
Github does not use system-ui alias for your configured font (unless you are on Safari with -apple-system alias), they use old solution. My first suggestion is to use system-ui, it should pick up your font.
However if it still(?) has issues in some browsers (is it actually have? Maybe issues come from 2019 and already solved?) then better to use "GitHub solution" + allow to pick font.
My first suggestion is to use system-ui, it should pick up your font.
However if it still(?) has issues in some browsers (is it actually have? Maybe issues come from 2019 and already solved?)
i did a cursory search before posting the issue here and saw recent complaints of the same; and if we look at that issue, there's activity from the past year.
better touse "GitHub solution" + allow to pick font
yep, i think this is what we're going to have to do. so, this issue will track the refactoring for defining a better default font family, and #1452 will track the feature request for making it configurable.
Activity
vitalyster commentedon May 19, 2025
Please use
system-uifont, not monospace. It may sounds like 1337 h4x0r use monospace fonts, but it will be too hard for others.sudoforge commentedon May 19, 2025
i haven't done any real FE work for more than a decade, and had no clue
system-uiexisted. seems like a reasonable default to me![-]web: monospace font (or custom fonts?)[/-][+]web: default to system font[/+]sudoforge commentedon May 19, 2025
relevant: w3c/csswg-drafts#3658
perhaps
system-uiis not ideal.vitalyster commentedon May 19, 2025
@sudoforge just copy "system font stack" hacks from Github or any other site and you are done
sudoforge commentedon May 19, 2025
@vitalyster the intent of that suggestion is understood and fine, but i want to point out that the actual implementation of that would not achieve the goal.
using your example of github, we see:
what we really need is support for letting the user pick.
vitalyster commentedon May 19, 2025
The issue is already split into parts:
sudoforge commentedon May 19, 2025
that's a fair observation; this really should be two issues (and is): #1452
sudoforge commentedon May 19, 2025
i was just pointing out that there wasn't a "one size fits all" way to implement support for the desired outcome here.
vitalyster commentedon May 19, 2025
I'm just pointing out that when user asks "please allow to change font" it means "your default font is wrong" :) If you will set up system font stack nobody will complain about wrong font and will not try to change it (because user can always change default font in the browser itself)
sudoforge commentedon May 19, 2025
yes, but for context:
so, i'm not convinced that "copying what github does" is actually a solution.
vitalyster commentedon May 19, 2025
Github does not use
system-uialias for your configured font (unless you are on Safari with -apple-system alias), they use old solution. My first suggestion is to usesystem-ui, it should pick up your font.However if it still(?) has issues in some browsers (is it actually have? Maybe issues come from 2019 and already solved?) then better to use "GitHub solution" + allow to pick font.
sudoforge commentedon May 19, 2025
i did a cursory search before posting the issue here and saw recent complaints of the same; and if we look at that issue, there's activity from the past year.
yep, i think this is what we're going to have to do. so, this issue will track the refactoring for defining a better default font family, and #1452 will track the feature request for making it configurable.