ant-design / ant-design-mobile

Essential UI blocks for building mobile web apps.
https://mobile.ant.design
MIT License
11.59k stars 2.39k forks source link

font-family: “blinkmacsystemfont” not working #6058

Closed AlbertLin0923 closed 1 year ago

AlbertLin0923 commented 1 year ago

Version of antd-mobile

5.7.2

Operating system and its version

Others

Browser and its version

macos chrome 111.0.5563.110 版本

Sandbox to reproduce

No response

What happened?


源码: https://github.com/ant-design/ant-design-mobile/blob/45d43619607fbcb81b4c54354295c6b90d818f85/src/global/theme-default.less#L35 这里设置了字体为 --adm-font-family: -apple-system, blinkmacsystemfont, 'Helvetica Neue', helvetica, segoe ui, arial, roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB', 'Microsoft Yahei', sans-serif;


问题:

blinkmacsystemfont 在Mac电脑 chorme浏览器似乎不生效: Mac电脑 chrome 会直接显示 ‘Helvetica Neue’

而手动添加 font-family:‘BlinkMacSystemFont‘ 正确的书写,会识别并显示系统 默认字体(’system-ui‘ )

Relevant log output

No response

miracles1919 commented 1 year ago
image

试了下能生效的