Skip to content

Commit 6b10e2c

Browse files
committed
feat: optimize link colors
1 parent 4f0bec6 commit 6b10e2c

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/editor/link.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
background-image: linear-gradient(transparent, transparent),
1111
#{icon('arrow-up-right', '#ddd')};
1212
}
13-
:is(body, .print .markdown-rendered) {
13+
body {
1414
--link-color-rgb: var(--setting-link-internal-color, var(--color-cyan-rgb));
1515
--link-external-color-rgb: var(
1616
--setting-link-external-color,
@@ -31,7 +31,11 @@
3131
--setting-link-external-color-underline,
3232
var(--link-external-color)
3333
);
34-
--link-unresolved-decoration-color: var(--link-unresolve-color);
34+
--link-unresolved-color: rgba(
35+
var(--link-color-rgb),
36+
calc(var(--color-opacity) * 0.85)
37+
);
38+
--link-unresolved-decoration-color: var(--link-unresolved-color);
3539
--link-footnote: var(--color-purple);
3640
--link-text-size: var(--font-text-size);
3741
}

src/style-settings/editor.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,10 @@ export default Settings.create('maple-editor', 'Maple Editor').children([
394394
en: 'Add Icon Before Link',
395395
zh: '在链接前添加图标',
396396
},
397+
desc: {
398+
en: '❗The icon will be duplicated if the link text contains space or extra styles',
399+
zh: '❗如果链接文本包含空格或额外样式,图标将会重复出现',
400+
},
397401
},
398402
{ enable: true },
399403
)

0 commit comments

Comments
 (0)