Skip to content

Commit

Permalink
feat: use source sans instead of noto for default fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
pengx17 committed Jul 21, 2021
1 parent 54a4696 commit 46463c8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/_blocks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ div.items-center::after,
content: "";
top: 1em;
bottom: 0;
left: -16px;
left: -17px;
position: absolute;
border-left: 2px solid transparent;
}
Expand Down
29 changes: 18 additions & 11 deletions src/_fonts.scss
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
@import url("https://fonts.googleapis.com/css2?family=Fira+Code&family=Noto+Sans+SC:wght@400;500;700;900&family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Fira+Code");
@import url("https://cdn.jsdelivr.net/gh/adobe-fonts/source-sans@3.046R/source-sans-3VF.css");

// Custom Source Han Sans VF fonts for Simplified Chinese
@font-face{
font-family: 'Source Han Sans VF';
font-weight: 200 900;
font-style: normal;
font-stretch: normal;
// The following is 17MB even after compression
src: url('https://cdn.jsdelivr.net/gh/adobe-fonts/source-han-sans@2.003R/Variable/Subset/SourceHanSansCN-VF.otf');
}

:root {
--ct-text-size: 15px;
--ct-text-size: 16px;
--ct-line-height: 1.5;
--ls-font-family: "Noto Sans", "Noto Sans SC", ui-sans-serif, system-ui,
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol", "Noto Color Emoji";
--ct-page-title-font-family: "Noto Sans SC", ui-sans-serif, system-ui,
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol", "Noto Color Emoji";
--ls-font-family: "Source Sans 3 VF", "Source Han Sans VF", ui-sans-serif,
system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--ct-page-title-font-family: var(--ls-font-family);
--ct-code-font-family: "Fira Code", ui-monospace, SFMono-Regular, Menlo,
Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}


html,
body {
font-size: var(--ct-text-size);
Expand Down
2 changes: 1 addition & 1 deletion src/_miscs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/* lists */
ol > li::marker {
font-family: Asap;
font-weight: 600;
font-variant-numeric: tabular-nums;
}
Expand All @@ -28,6 +27,7 @@ ol > li::marker {
b,
strong {
color: var(--ct-bold-color);
font-weight: 600;
}

/* External links */
Expand Down

0 comments on commit 46463c8

Please sign in to comment.