Opened 9 years ago
Closed 9 years ago
#39379 closed defect (bug) (fixed)
Twenty Seventeen: Error font-family for Simplified Chinese (zh_CN) in CSS
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.8 | Priority: | normal |
| Severity: | normal | Version: | 4.7 |
| Component: | Bundled Theme | Keywords: | good-first-bug has-patch |
| Focuses: | Cc: |
Description (last modified by )
In the style.css of the new theme twentyseventeen (both stable and nightly build), line 664, which defines Chinese font:
/* Typography for Chinese Font */
html[lang^="zh-"] body,
html[lang^="zh-"] button,
html[lang^="zh-"] input,
html[lang^="zh-"] select,
html[lang^="zh-"] textarea {
font-family: "PingFang TC", "Helvetica Neue", Helvetica, STHeitiTC-Light, Arial, sans-serif;
}
However, this CSS is only suitable for zh-HK and zh-TW, but not for zh-CN, which should not use traditional Chinese (TC), but Simplified Chinese (SC)
So it needs to add these line after that, and it works well:
html[lang="zh-CN"] body,
html[lang="zh-CN"] button,
html[lang="zh-CN"] input,
html[lang="zh-CN"] select,
html[lang="zh-CN"] textarea {
font-family: "PingFang SC", "Helvetica Neue", Helvetica, STHeitiSC-Light, Arial, sans-serif
}
Attachments (1)
Change History (11)
#1
@
9 years ago
- Component changed from General to Bundled Theme
- Summary changed from Error font-family for Simplified Chinese (zh_CN) in twentyseventeen’s CSS to Twenty Seventeen: Error font-family for Simplified Chinese (zh_CN) in CSS
#4
@
9 years ago
@davidakennedy Note the different CSS. zh-CN should use "PingFang SC" and STHeitiSC-Light, but all other zh- should use "PingFang TC" and STHeitiTC-Light (TC vs SC).
#5
follow-up:
↓ 6
@
9 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
@swissspidy Ah, thank you for the clarification! I missed that when I read the CSS three times before. :)
This makes sense to me to change if it makes the theme better on language variations. I do want to get input from @melchoyce and have her eyes on this. Want to tweak and test this?
#6
in reply to:
↑ 5
@
9 years ago
Replying to davidakennedy:
@swissspidy Ah, thank you for the clarification! I missed that when I read the CSS three times before. :)
This makes sense to me to change if it makes the theme better on language variations. I do want to get input from @melchoyce and have her eyes on this. Want to tweak and test this?
Yup, this needs to be fixed 👍
Hey @ze3kr! Thanks for the bug report, and welcome to Trac!
Can you explain in more detail what's not working? So the CSS should be applied to
zh-CNbut isn't unless you specify it specifically?