Skip to content

Commit f9cc9f4

Browse files
author
Damian Jóźwiak
authored
Merge pull request #101 from Wikia/XW-2203
XW-2203 | extended definition for font-family set
2 parents 61aec14 + f70a805 commit f9cc9f4

File tree

8 files changed

+28
-7
lines changed

8 files changed

+28
-7
lines changed

app/styles/app.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,11 @@ pre {
127127
}
128128
}
129129

130+
.warning-note {
131+
background-color: rgba($wds-color-warning, .2);
132+
border: 1px solid rgba($wds-color-warning, .9);
133+
margin-top: 30px;
134+
padding: 14px;
135+
}
136+
130137
////////////////////////////////////// END of Reusable Classes section //////////////////////////////////////

app/templates/base-styles/typography.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<section>
1515
<h2 id="font-family">Font Family</h2>
1616
<p>For highest browser compatibility we decided to follow direction described in <a href="https://www.smashingmagazine.com/2015/11/using-system-ui-fonts-practical-guide/">Using System UI Fonts In Web Design: A Quick Practical Guide</a>. It provides a list of font-families for browsers to fallback. We listed font-families supported by major operating systems and finally we fall back to <code>sans-serif</code>. This way we can avoid web-font delivery process which would hit page performance.</p>
17-
<code><span class="format-code">$wds-font-family</span>: 'San Francisco', 'Helvetica Neue', 'Roboto', 'Segoe UI', 'Ubuntu', 'Droid Sans', sans-serif;</code>
17+
<code><span class="format-code">$wds-font-family</span>: 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Hiragino Sans GB', 冬青黑体, 'Microsoft YaHei', 微软雅黑体, sans-serif;</code>
1818
</section>
1919

2020
<section>

app/templates/route-components/buttons.hbs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,20 @@
6464
{{#wds-button class='wds-is-secondary wds-is-squished'}}Secondary{{/wds-button}}
6565
{{#wds-button class='wds-is-text wds-is-squished'}}Text{{/wds-button}}
6666
{{/component-demo}}
67+
<p class="warning-note">
68+
<strong>Important note:</strong> for readability purposes we use different styling for squished button in Global Navigation for Chinese - the font is larger and has bold removed.
69+
This is why in <code class="format-code">/scss/wds-components/_global-navigation.scss</code> you will find the following piece of code:
70+
{{#code-sample language='scss'}}
71+
html[lang^='zh'] &__start-a-wiki-button {
72+
font-size: 12px;
73+
font-weight: 400;
74+
padding: 9px 12px 8px;
75+
}
76+
{{/code-sample}}
77+
78+
Please remember, that this solution is only single-use and temporary. It is not recommended to apply it as a common solution in other places/components.
79+
If it becomes a broader issue, more versatile and maintainable solution must be implemented.
80+
</p>
6781
</section>
6882

6983
<section>

dist/scss/wds-variables/_typography.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Font family - see https://www.smashingmagazine.com/2015/11/using-system-ui-fonts-practical-guide/
2-
$wds-font-family: 'San Francisco', 'Helvetica Neue', 'Roboto', 'Segoe UI', 'Ubuntu', 'Droid Sans', sans-serif;
2+
$wds-font-family: 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Hiragino Sans GB', 冬青黑体, 'Microsoft YaHei', 微软雅黑体, sans-serif;
33

44
// Line height
55
$wds-line-height: 1.5em;

docs/assets/design-system.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/assets/design-system.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<meta name="viewport" content="width=device-width, initial-scale=1">
99

1010

11-
<meta name="design-system/config/environment" content="%7B%22modulePrefix%22%3A%22design-system%22%2C%22environment%22%3A%22production%22%2C%22rootURL%22%3A%22/%22%2C%22locationType%22%3A%22hash%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%7D%2C%22APP%22%3A%7B%22name%22%3A%22design-system%22%2C%22version%22%3A%222.1.1+8bb55ce0%22%7D%2C%22exportApplicationGlobal%22%3Afalse%7D" />
11+
<meta name="design-system/config/environment" content="%7B%22modulePrefix%22%3A%22design-system%22%2C%22environment%22%3A%22production%22%2C%22rootURL%22%3A%22/%22%2C%22locationType%22%3A%22hash%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%7D%2C%22APP%22%3A%7B%22name%22%3A%22design-system%22%2C%22version%22%3A%223.0.0+9d066901%22%7D%2C%22exportApplicationGlobal%22%3Afalse%7D" />
1212

1313
<link rel="stylesheet" href="/assets/vendor.css">
1414
<link rel="stylesheet" href="/assets/design-system.css">

style-guide/styles/wds-variables/_typography.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Font family - see https://www.smashingmagazine.com/2015/11/using-system-ui-fonts-practical-guide/
2-
$wds-font-family: 'San Francisco', 'Helvetica Neue', 'Roboto', 'Segoe UI', 'Ubuntu', 'Droid Sans', sans-serif;
2+
$wds-font-family: 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Hiragino Sans GB', 冬青黑体, 'Microsoft YaHei', 微软雅黑体, sans-serif;
33

44
// Line height
55
$wds-line-height: 1.5em;

0 commit comments

Comments
 (0)