Skip to content

Commit 94b588b

Browse files
committed
Increase font weight of Noto Serif SC, adjust the style of snackbar
1 parent d3750e2 commit 94b588b

File tree

10 files changed

+27
-17
lines changed

10 files changed

+27
-17
lines changed

npm/src/component/dialog/SearchDialog.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
color: var(--list-secondary-ink);
1717
line-break: normal;
1818
font-weight: var(--font-weight-light);
19+
20+
strong, b {
21+
font-weight: var(--font-weight-normal);
22+
}
1923
}
2024

2125
.mdc-text-field {

npm/src/component/font/font.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
@use "MaterialSymbols";
1212

1313
// @font-face {
14-
// font-family: "Demo";
15-
// src: url("https://apqx-host.oss-cn-hangzhou.aliyuncs.com/blog/fonts/JetBrainsMono/v2.304/JetBrainsMono%5Bwght%5D.ttf") format('truetype');
14+
// font-family: "Iosevka";
15+
// src: url("https://apqx-host.oss-cn-hangzhou.aliyuncs.com/blog/fonts/Iosevka/v33.2.9/Iosevka-Extended.woff2") format('woff2');
1616
// font-style: normal;
17-
// font-weight: 200 900;
17+
// font-weight: 400;
1818
// font-display: swap;
1919
// }
2020

npm/src/component/react/IndexList.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// @use "../animation/HeightAnimationContainer";
66

77
body {
8-
--index-card-padding-vertical: 1.3rem;
9-
--index-card-padding-horizontal: 2.7rem;
8+
--index-card-padding-vertical: 1.25rem;
9+
--index-card-padding-horizontal: 2.5rem;
1010
}
1111

1212
.mdc-card.index-top-card {
@@ -68,7 +68,7 @@ body {
6868
/* 索引署名 */
6969
.index-author {
7070
color: var(--mdc-theme-text-secondary-on-background);
71-
font-size: calc(var(--mdc-typography-body1-font-size) - 0.1rem);
71+
font-size: calc(var(--mdc-typography-body1-font-size) - 0.2rem);
7272
line-height: var(--mdc-typography-body1-line-height);
7373
line-height: 1.5rem;
7474
text-align: right;
@@ -79,7 +79,7 @@ body {
7979
/* 索引日期 */
8080
.index-date {
8181
color: var(--mdc-theme-text-secondary-on-background);
82-
font-size: calc(var(--mdc-typography-body1-font-size) - 0.1rem);
82+
font-size: calc(var(--mdc-typography-body1-font-size) - 0.2rem);
8383
line-height: var(--mdc-typography-body1-line-height);
8484
line-height: 1.5rem;
8585
text-align: right;

npm/src/component/react/Snackbar.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
padding-right: 0;
1616
min-width: 0;
1717

18-
background-color: var(--mdc-theme-secondary);
18+
background-color: var(--snackbar-bg);
1919
backdrop-filter: blur(10px);
2020
-webkit-backdrop-filter: blur(10px);
2121
}
2222

2323
.mdc-snackbar__label {
24-
color: var(--mdc-theme-on-surface);
24+
color: var(--snackbar-ink);
2525
padding-left: 1rem;
2626
padding-right: 1rem;
2727
}

npm/src/component/react/Snackbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class Snackbar extends React.Component<props, any> {
1717
componentDidMount(): void {
1818
const rootE = this.containerRef.current as Element
1919
this.snackbar = new MDCSnackbar(rootE)
20-
// 自动关闭时间
20+
// 自动关闭时间,-1 表示不自动关闭
2121
// this.snackbar.timeoutMs = -1
2222
this.snackbar.open()
2323
}

npm/src/component/text.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ p {
7171

7272
code {
7373
@include basicText();
74-
// font-family: base.$code-block-font;
7574
margin: 0;
7675
}
7776

npm/src/component/theme.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
--surface-block-border: #{map.get(base.$surface-block-border-dashed, "light")};
6767
--surface-block-bg: #{map.get(base.$surface-block-bg, "light")};
6868
--surface-block-ink-strong: #{map.get(base.$surface-block-ink-strong, "light")};
69+
70+
--snackbar-bg: #{map.get(base.$snackbar-bg, "light")};
71+
--snackbar-ink: #{map.get(base.$snackbar-ink, "light")};
6972
}
7073

7174
@mixin dark {
@@ -118,6 +121,9 @@
118121
--surface-block-border: #{map.get(base.$surface-block-border-dashed, "dark")};
119122
--surface-block-bg: #{map.get(base.$surface-block-bg, "dark")};
120123
--surface-block-ink-strong: #{map.get(base.$surface-block-ink-strong, "dark")};
124+
125+
--snackbar-bg: #{map.get(base.$snackbar-bg, "dark")};
126+
--snackbar-ink: #{map.get(base.$snackbar-ink, "dark")};
121127
}
122128

123129
body {

npm/src/page/index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@use "../style/global" as base;
2-
// 如果放到组件中加载时可能出现样式闪烁
2+
// 如果放到组件中加载时可能出现样式闪烁,放到这里有时候也会出现,因为这里也是根据页面类型动态加载的
33
@use "../component/react/IndexList";
44
@use "../component/react/GridIndexList";
55

npm/src/page/post.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
border-radius: var(--post-inner-shape-round);
3535
background: var(--surface-block-bg);
3636
padding: 1rem;
37+
font-weight: var(--font-weight-light);
3738
}
3839

3940
.line-divider {

npm/src/style/_variables.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ $ripple-gap-percent: 25%;
2323

2424
// 思源黑体和思源宋体都是可变字体,但与其配合的西文字体不一定是可变的,应调整自重与之匹配
2525
$font-weight-light-noto-sans: 320;
26-
$font-weight-normal-noto-sans: 360;
27-
$font-weight-medium-noto-sans: 400;
26+
$font-weight-normal-noto-sans: 380;
27+
$font-weight-medium-noto-sans: 480;
2828

29-
$font-weight-light-noto-serif: 300;
30-
$font-weight-normal-noto-serif: 430;
31-
$font-weight-medium-noto-serif: 560;
29+
$font-weight-light-noto-serif: 350;
30+
$font-weight-normal-noto-serif: 450;
31+
$font-weight-medium-noto-serif: 550;
3232

3333
$font-weight-extra-light-default: 200;
3434
$font-weight-light-default: 300;

0 commit comments

Comments
 (0)