Skip to content

Commit 7ec31e8

Browse files
authored
refactor: enhance the configurability of fonts (#986)
1 parent b63b65d commit 7ec31e8

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

_sass/addon/commons.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ body {
3434
env(safe-area-inset-bottom) env(safe-area-inset-left);
3535
color: var(--text-color);
3636
-webkit-font-smoothing: antialiased;
37-
font-family: 'Source Sans Pro', 'Microsoft Yahei', sans-serif;
37+
font-family: $font-family-base;
3838
line-height: 1.75;
3939
}
4040

_sass/addon/module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
%heading {
88
color: var(--heading-color);
99
font-weight: 400;
10-
font-family: Lato, 'Microsoft Yahei', sans-serif;
10+
font-family: $font-family-heading;
1111
}
1212

1313
%section {

_sass/addon/variables.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,8 @@ $bottom-min-height: 35rem !default;
2828
/* syntax highlight */
2929

3030
$code-font-size: 0.85rem !default;
31+
32+
/* fonts */
33+
34+
$font-family-base: 'Source Sans Pro', 'Microsoft Yahei', sans-serif;
35+
$font-family-heading: Lato, 'Microsoft Yahei', sans-serif;

_sass/jekyll-theme-chirpy.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"colors/light-typography",
1111
"colors/dark-typography",
1212

13-
"addon/module",
1413
"addon/variables",
1514
"variables-hook",
15+
"addon/module",
1616
"addon/syntax",
1717
"addon/commons",
1818

0 commit comments

Comments
 (0)