Problem/Motivation
BlinkMacSystemFont was a non-standardised value of system-ui which only worked in older browsers.
In Drupal 10 we only support modern browsers so we can standardise on system-ui.
Steps to reproduce
See https://caniuse.com/font-family-system-ui
Proposed resolution
- --font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+ --font-family: system-ui;
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comments
Comment #2
martijn.cuppens commentedComment #3
martijn.cuppens commentedComment #4
kristen polComment #5
kristen polThanks for the patch.
1) Checked the 9.1 dev code and found
BlinkMacSystemFontin the following files, and didn't find any usage of "system-ui".2) Patch applies cleanly to 9.0 and 9.1:
3) After applying the patch,
BlinkMacSystemFontonly showed up in thevendorfiles.4) I'm not a frontend developer so did some googling and found a post from 2017 that says:
in https://css-tricks.com/snippets/css/system-font-stack/.
And found others who are making the switch:
https://github.com/primer/css/issues/838
https://github.com/sindresorhus/modern-normalize/issues/18
Based on this, marking this RTBC.
Comment #6
kristen polComment #7
lauriiiThank you @Kristen Pol! That is an excellent documentation on your review. I added commit credit for you to make sure that you get credited once this gets committed.
I think we should still do some manual testing on browsers we currently support to make sure that there aren't any regressions.
Comment #8
kristen polGood point! What would you like manually tested? Just generally "click around"?
Comment #9
martijn.cuppens commentedBlinkMacSystemFontwas only used for Chrome 53-55.FWIW, we also recently switched from
BlinkMacSystemFonttosystem-uiin Bootstrap. If, for some reason, an issue occurs, I'll let you know.Comment #10
thallesThe patch was clean applied, and apparently the font looks the same, see:
I am using Chrome in your version 81.0.4044.92, if needed I can to do tests in others browser.
Comment #11
lauriii@martijn.cuppens thank you! I'm wondering if you have any insights on what might have addressed https://infinnie.github.io/blog/2017/systemui.html between now and https://github.com/twbs/bootstrap/pull/22377?
Comment #12
lauriiiMaybe we should prioritize this issue since it seems like
BlinkMacSystemFontis not working properly on Chrome 81. There's an issue for this in the Chromium bug tracker. There's also a blog post with some more screenshots of the regression.Comment #13
bnjmnmThe chrome bug mentioned in #12 impacts both
BlinkMacSystemFontandsystem-ui, so committing this issue would not be a way of circumventing the bug so there's not much benefit in prioritizing this. I'm unsure if there's much benefit in a target followup, either as I manually confirmed the bug is fixed in Chrome 83 beta, which is scheduled for release on May 19 (8 days) which is potentially faster than it would be to reach an agreement on an alternative font approach that hasn't yet been vetted/discussedComment #14
kristen polIMO switching away from
BlinkMacSystemFontseems like a fine approach (since it's an old approach) even if it doesn't address the bug noted in #12.Based on:
1) Patch has been reviewed
2) Patch has been manually tested
3) People are moving away from
BlinkMacSystemFontI am marking this RTBC so the core maintainers can make the final call.
Comment #15
kristen polAlthough not marked as a bug, I worked on this as part of the Bug Smash Initiative.
Comment #16
lauriiiI think we need some more manual testing to address #11. The root cause for the revert in Bootstrap has been explained here https://infinnie.github.io/blog/2017/systemui.html.
Comment #17
kristen polOh! Sorry I missed that. Unfortunately I don't have Windows to test on.
Comment #18
lauriiiNo worries! I realized my comment was a bit vague in the first place. 😄
Microsoft provides free virtual machines for browser testing https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ if you're interested in trying to test this in Windows environment.
Comment #19
quietone commentedI am looking for issues needing manual testing and found this. But there are no instructions in the IS on how to test this.
Reading the issue I see that there has been manual testing but 'more' needs to be done. The last comment says that this needs to be tested in a windows environment, Is that all that needs to be done?
I looked at the link for windows VMs, there are 6 VMs to choose from. Which one or ones to use? Of course, that assumes I could figure out how to install Drupal in windows.
I suggest an issue summary update with steps to reproduce and what environments testing needs to be done would help.
Sorry I can't help.
Comment #22
sakthivel m commentedPatch Failed, Needs Re-roll
Comment #23
sakthivel m commented#23 Please review the patch
Comment #24
chetanbharambe commentedComment #25
chetanbharambe commentedVerified and tested patch #23.
Patch applied successfully and looks good to me.
Testing Steps:
# Goto: admin/appearance
# Inspect element and check the font family on "Warning message
There was a problem checking available updates for Drupal."
Expected Results:
# Use `system-ui` instead of deprecated `BlinkMacSystemFont`
Actual Results:
# Currently `BlinkMacSystemFont` is appearing
Please find attached screenshots.
Can be a move to RTBC.
Comment #27
imalabyaRe-testing again. Seems like irrelevant test failure
Comment #28
lauriiiWe need to do cross-browser testing to address #18.
Comment #29
gauravvvv commentedComment #30
gauravvvv commentedHere are results of cross browser testing.



After patch:
Comment #31
volkswagenchickTagging for DrupalCamp Colorado
DCCO2021which is Sunday August 8.https://2021.drupalcampcolorado.org/contrib-day
This patch can be re-rolled into a Merge Request to make maintainer review easier, thanks!
Comment #32
cedeweyI've checked the patch in all supported browsers and it both looks visually as expected and uses the system-ui font family as expected.
Comment #33
alexpottRe #16 - Bootstrap has no added this back - see https://github.com/twbs/bootstrap/pull/30561 and other tools are making
system-uiso it seems the world has moved on.Comment #34
alexpottThere's loads of duplicate fonts here. It looks like our preprocessor has an understanding of system-ui and expands that to be:
system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serifAnyhow - all the stuff after it -
"Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serifis going to be ignored.Comment #35
longwavepostcss-preset-env is responsible for #34: https://github.com/csstools/postcss-preset-env
We can disable this by setting
system-ui-font-familyto false in core/scripts/css/compile.js. Alternatively, we could just specifysystem-uialone in our font family lists, and allow PostCSS to provide the fallback list.If we switch to PostCSS then the changes are:
Not sure what the implications of this change would be.
Comment #36
longwaveI think we need to keep
-apple-system- given we support Firefox ESR, the current version of which is 91, and according to https://caniuse.com/font-family-system-ui only supports-apple-systemand notsystem-ui.Comment #37
vikashsoni commentedApplied patch #23 working fine and giving expected result
for ref sharing screenshot....
Comment #38
bnjmnmRemoving credit for providing redundant screenshots.
Comment #39
longwaveI've been thinking about this on and off for a while and I suggest that the best route forward is to embrace
postcss-preset-envinstead of providing our own system font list. We already usepostcss-preset-envto polyfill other CSS features, and it means that as we move forward and upgrade this package we automatically take the list from an upstream source who are likely better at maintaining it than we are, rather than having to maintain it ourselves.This patch simply sets
--font-family: system-ui;in .pcss.css and lets PostCSS expand this to a full list of system fonts.Comment #40
mglaman+1 to #39. It's better to delegate to a tool we're already using. It seems like the easiest and most maintainable approach.
Here's the source in
postcss-preset-envfor the curious: https://github.com/csstools/postcss-preset-env/blob/41aa2935f83844e6e2b3...Copied here as well:
Comment #41
kristen polThanks for the new patch and the feedback. Tagging for issue summary update and this still needs manual testing.
Comment #44
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #45
longwaveThings have moved on, and in Drupal 10 now we no longer support IE11 or other old browsers, so we can just use
system-ui: https://caniuse.com/font-family-system-uiComment #46
gauravvvv commentedComment #47
smustgrave commentedTesting on chrome and firefox I'm not noticing any issues clicking around claro.
Regarding #16 I don't have a windows to test on but do we still think there could be a windows issue after 3 years?
Comment #48
lauriiiWe still need to confirm that #11 isn't the case anymore. The key concern seems to be Windows machines on languages using different default fonts (i.e. Chinese). It was brought up in the issue linked on #33 and that's why it looks like Bootstrap decided to just append their font-stack with
system-ui.Comment #49
smustgrave commentedSince it's been 2 months moving to PNMI for #11 to be addressed.
Comment #51
smustgrave commentedJust following up if anyone has been able to verify #11, if no follow up could close out in 3 months.
Comment #52
smustgrave commentedwanted to bump this 1 last time.
Comment #53
longwaveI am still in favour of doing this as per #39 and #45.
#11 is 5 years old, referencing a blog post from 8 years ago; things have moved on since then.
As an example here's a more modern blog post saying the opposite to #11: https://www.highperformancewebfonts.com/read/ditch-BlinkMacSystemFont-an...