/* ==UserStyle== @name:en Global Font: PingFang for macOS @name 全局苹方(macOS 专用) @namespace yuchen95/userstyle @version 1.1.6 @description:en A user stylesheet for macOS that replaces web page fonts with PingFang and native Apple system fonts. @description 一款专为 macOS 设计、使用苹方及 Apple 原生系统字体替换网页字体的用户样式表。 @author yuchen95 @license MIT @preprocessor default ==/UserStyle== */ /* Generated by scripts/build-userstyles.mjs. */ :root { --font-emoji: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', emoji; --font-sans-fallback: system-ui, ui-sans-serif, sans-serif, var(--font-emoji); --font-mono-fallback: ui-monospace, monospace, var(--font-emoji); --font-zh-hans: 'Helvetica Neue', 'PingFang SC', '苹方-简', 'Hiragino Sans GB', var(--font-sans-fallback); --font-zh-hant: 'Helvetica Neue', 'PingFang TC', '蘋方-繁', var(--font-sans-fallback); --font-zh-hk: 'Helvetica Neue', 'PingFang HK', '蘋方-港', var(--font-sans-fallback); --font-ja: 'Helvetica Neue', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', var(--font-sans-fallback); --font-ko: 'Helvetica Neue', 'Apple SD Gothic Neo', var(--font-sans-fallback); --font-latin: 'Helvetica Neue', 'PingFang SC', '苹方-简', var(--font-sans-fallback); --font-mono: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Monaco', var(--font-mono-fallback); --font-mono-ja: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Monaco', var(--font-mono-fallback); --font-mono-current: var(--font-mono); --font-current: var(--font-zh-hans); } html:is( :lang(zh-TW), :lang(zh-Hant), :lang(cmn-Hant), :lang(zh-cmn-Hant) ) { --font-current: var(--font-zh-hant); } html:is( :lang(zh-HK), :lang(zh-MO), :lang(yue), :lang(zh-yue-Hant) ) { --font-current: var(--font-zh-hk); } html:lang(ja) { --font-current: var(--font-ja); --font-mono-current: var(--font-mono-ja); } html:lang(ko) { --font-current: var(--font-ko); } html:is( :lang(de), :lang(nl), :lang(en), :lang(nb), :lang(no), :lang(is), :lang(da), :lang(sv), :lang(pt), :lang(es), :lang(fr), :lang(it), :lang(ro), :lang(lv), :lang(lt), :lang(pl), :lang(cs), :lang(sk), :lang(bs), :lang(hr), :lang(sr), :lang(bg), :lang(sl), :lang(ru), :lang(uk), :lang(be), :lang(el), :lang(hu), :lang(et), :lang(fi), :lang(tr), :lang(id), :lang(ms), :lang(vi) ) { --font-current: var(--font-latin); } html:is( :lang(ar), :lang(he), :lang(th) ) { --font-current: var(--font-sans-fallback); --font-mono-current: var(--font-mono-fallback); } html, body { font-family: var(--font-current); } /* Specificity boost for normal page font declarations; page !important rules win. */ html:root:not(#global-font-userstyle):not(#global-font-override):not(#global-font-force) body, html:root:not(#global-font-userstyle):not(#global-font-override):not(#global-font-force) body :where( :not( pre, pre *, code, code *, kbd, kbd *, samp, samp *, .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .cm-editor, .cm-editor *, .monaco-editor, .monaco-editor *, i, i *, svg, svg *, math, math *, [role='img'], [role='img'] *, [class*='icon' i], [class*='icon' i] *, [class~='fa' i], [class~='fa' i] *, [class*='fa-' i], [class*='fa-' i] *, [class*='fontawesome' i], [class*='fontawesome' i] *, [class*='material-symbol' i], [class*='material-symbol' i] *, [class*='emoji' i], [class*='emoji' i] * ) ) { font-family: var(--font-current); } html:root:not(#global-font-userstyle):not(#global-font-override):not(#global-font-force) :is(pre, code, kbd, samp) { font-family: var(--font-mono-current); } button, input, optgroup, select, textarea { font-family: inherit; } /* Remove the font-dependent baseline gap from media-only logo links. */ a:has(> :is(svg, img):only-child) { line-height: 0 !important; } html:is( :lang(zh), :lang(cmn), :lang(zh-cmn) ) body { quotes: '“' '”'; } html:is( :lang(zh-TW), :lang(zh-Hant), :lang(cmn-Hant), :lang(zh-cmn-Hant), :lang(zh-HK), :lang(zh-MO), :lang(yue), :lang(zh-yue-Hant), :lang(ja) ) body { quotes: '「' '」'; } html:lang(de) body { quotes: '„' '“'; } html:is( :lang(nb), :lang(no), :lang(es) ) body { quotes: '«' '»'; } html:lang(fr) body { quotes: '« ' ' »'; } /* Site-specific font fixes. */ @-moz-document domain("baidu.com"), regexp("https://www\\.baidu\\.com/(s|#)?.*"), regexp("https://(\\w+\\.)?bing\\.com/(search)?.*"), regexp("https://www\\.google(\\.\\w+){1,2}/(search)?.*"), regexp("https://www\\.so\\.com/s?.*"), regexp("https://(www\\.)?sogou\\.com/(web|sogou)?.*") { * { font-family: var(--font-zh-hans); } } @-moz-document domain("github.com") { .text-mono { font-family: var(--font-mono); } .blob-num, .blob-code-inner { font-family: var(--font-mono); } } @-moz-document domain("greasyfork.org") { #script_version_code, .ace_editor { font-family: var(--font-mono); } } @-moz-document domain("ithome.com") { .post_comment { font-family: var(--font-zh-hans); } } @-moz-document domain("jiemian.com") { .article-content { font-family: var(--font-zh-hans); } } @-moz-document domain("www.163.com") { .end-text, .post_body { font-family: var(--font-zh-hans); } } @-moz-document domain("sspai.com") { h1, h2, h3, h4, h5, h6, p, a, .title, .content { font-family: var(--font-zh-hans); } }