Skip to content

Commit 8c73e28

Browse files
committed
Optimize link style in chrome and firefox
1 parent 833e768 commit 8c73e28

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

npm/dist/assets/blog-scaffold.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.

npm/src/component/font/font.scss

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@
1414
// 但是其使用的 CBDT/CBLC 色彩格式并不被 Safari 支持,导致渲染明显卡顿,不要使用
1515
// @use "NotoColorEmojiRegular";
1616

17-
// Noto Serif SC,思源宋体
18-
// @import url("https://fonts.googleapis.com/css2?family=Noto+Serif+SC:[email protected]&display=swap");
19-
// // Noto Sans SC,思源黑体
20-
// @import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:[email protected]&display=swap");
21-
// // Noto Sans SC,思源黑体,等宽
22-
// @import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:[email protected]&display=swap");
23-
2417
// @font-face {
2518
// font-family: "Noto Serif SC";
2619
// src: url("http://localhost:4000/assets/NotoSerifSC-VariableFont_wght.ttf") format('truetype');

npm/src/component/text.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,10 @@ a {
142142
position: relative;
143143
text-decoration: underline;
144144
// 下划线与文字的间距
145-
text-underline-offset: 0.25rem;
145+
// Safari
146+
-webkit-text-underline-offset: 0.18rem;
147+
// Chrome, Firefox
148+
text-underline-offset: 0.15rem;
146149
// 下划线粗细
147150
text-decoration-thickness: 1px;
148151
// 去除移动版Chrome点击时默认的蓝色背景
@@ -152,7 +155,7 @@ a {
152155
}
153156

154157
.font-noto-serif-sc a {
155-
text-underline-offset: 0.2rem;
158+
text-underline-offset: 0.15rem;
156159
}
157160

158161
// a::after {

0 commit comments

Comments
 (0)