-
Notifications
You must be signed in to change notification settings - Fork 806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does "system-ui" really needed under Windows? #666
Comments
Bootstrap also removed it. |
In any case, As with Unfortunately, we do not yet live in a world where this standard is well/consistently supported across platforms. Its behavior does vary between browsers, even under Linux, and is mostly useless or counterproductive under Windows (if I recall correctly, the effect in your case corresponds to An example of my own CJK-proof native-ish font stack (for Fomantic UI) could be found here (note: upstream has not yet fixed their bugs introduced by several maintenance commits, while the base stylesheets have since been renovated with modern variable-based native CSS instead of Less mixins). Last but not least, if you insist on the removal of Edit: it seems Bootstrap has lifted Edit 2: Damn, just tested under |
10 days of hard work to bring out this solution: go-gitea/gitea#14575. https://gist.github.com/CL-Jeremy/efd1351858c4feb894d6aee0bea448e0 (with 600 as boldface, as requested by original project) TL;DR: this solution creates custom font faces based on stacks of selected local fonts to deliver good results on various platforms. For Windows, it now hard-codes "Segoe UI" before The proposed font stack: html {
font-family: -apple-system, "Segoe UI", system-ui, "Roboto", "Helvetica Neue", "Arial", "Noto Sans", "Liberation Sans", sans-serif;
}
html:lang(<locale>), [lang="<locale>"] {
font-family: system-emoji, system-ui-<locale>, -apple-system, "Segoe UI", system-ui, "Roboto", "Helvetica Neue", "Arial", "Noto Sans", "Liberation Sans", sans-serif;
}
@font-face {
font-family: system-emoji;
src: local("Apple Color Emoji"), local("Segoe UI Emoji"), local("Noto Color Emoji"), local("Twemoji Mozilla");
unicode-range: U+2310-329F, U+FE0?, U+1F000-1FAFF;
}
@font-face {
font-family: system-ui-<locale>;
src: <source1>[, <source2>, ...];
unicode-range: <unicode-range>#;
} Note the special treatment for emojis, as they share certain code ranges with that of various JIS symbols adopted into Unicode and later repurposed as colored emojis. |
I did not test too much, but why not also include |
As noted above, by then I would like to leave that to the monochrome font stack and prefer those symbols from the localized font. Extensive tests have confirmed it being used as a last resort at |
What does the above do? Where are the variables, source 1 and source 2, etc, defined"? |
Those aren't variables, they are just placeholders (typically written between angle brackets) for the actual localized font stacks. For Japanese, that would include Hiragino Sans, Yu Gothic, Meiryo, MS Gothic, etc. Note this approach with Unicode ranges has long been deprecated in favor of overriding with CSS variables, as long as the targeted platforms are modern enough to support that feature. Granted, the code I posted was more of a proof of concept than anything else. It's best to keep everything as simple as possible - like just defining everything separately for each language if no more than a handful of languages are needed. The need for |
This allows a meeting's secretary/chair to a current motion at the /m/:meetingId/chair route and for others to view when that changes at the /m/:meetingId/participant route instantly. Shout-out to this user on GitHub for the optimal system-font CSS: picturepan2/spectre#666 (comment) Resolves #1
I met this problem when I using Grav, and later I found this is not Grav specific problem at least:
I'm building a Japanese site with
lang="ja"
being correctly assigned tohtml
tag.All other
font-family
overriding entries have been overwrittten withinherit
.And let's assume the final valid css entry for Japanese is :
But when I check my site under Simp. Chinese Windows, it displays like this :
You can see the browser selected a Chinese font as the fallback for
system-ui
, which is against one of my intended purposes : uselang="ja"
to let the renderer determine an existing Japanese font as the final fallback font.When I remove
system-ui
, everything works as intended.Also, I've checked my site using iPad before
system-ui
removal, it fallbacks to Hiragino Sans without problem, that's why I would say it's a problem under Windows. I don't seesystem-ui
makes any sense for other OS so it might be totally useless or even worse in actual practice.There are also few articles about deprecating
system-ui
, I link one of them here fyi.https://infinnie.github.io/blog/2017/systemui.html
The text was updated successfully, but these errors were encountered: