style: 调整markdown样式问题

This commit is contained in:
ccnetcore
2026-02-02 22:03:48 +08:00
parent 9b7d98773b
commit 016f930021
3 changed files with 67 additions and 157 deletions

View File

@@ -297,95 +297,6 @@ onUnmounted(() => {
line-height: 1.7; line-height: 1.7;
word-wrap: break-word; word-wrap: break-word;
overflow-wrap: break-word; overflow-wrap: break-word;
// 深色主题
&.theme-dark {
color: #e6edf3;
a {
color: #58a6ff;
&:hover {
text-decoration: underline;
}
}
h1, h2, h3, h4, h5, h6 {
color: #e6edf3;
border-bottom-color: #30363d;
}
hr {
background-color: #30363d;
}
blockquote {
color: #8b949e;
border-left-color: #3b434b;
}
code.inline-code {
background-color: rgba(110, 118, 129, 0.4);
color: #e6edf3;
}
.code-block-wrapper {
background-color: #161b22;
border: 1px solid #30363d;
.code-block-header {
background-color: #21262d;
border-bottom-color: #30363d;
.code-lang {
color: #8b949e;
}
.copy-btn,
.preview-btn {
color: #8b949e;
&:hover {
color: #e6edf3;
background-color: #30363d;
}
&.copied {
color: #3fb950;
}
}
}
.code-block-body {
.line-numbers {
background-color: #161b22;
border-right: 1px solid #30363d;
.line-number {
color: #6e7681;
}
}
}
pre.hljs {
background-color: #161b22;
}
}
table {
th {
background-color: #21262d;
}
td, th {
border-color: #30363d;
}
tr:nth-child(2n) {
background-color: #161b22;
}
}
.markdown-image {
background-color: transparent;
}
}
// 浅色主题 // 浅色主题
&.theme-light { &.theme-light {
color: #24292f; color: #24292f;

View File

@@ -17,7 +17,7 @@ hue-6: #d19a66
hue-6-2: #e6c07b hue-6-2: #e6c07b
*/ */
[data-theme="dark"]{
.hljs { .hljs {
display: block; display: block;
overflow-x: auto; overflow-x: auto;
@@ -94,3 +94,5 @@ hue-6-2: #e6c07b
.hljs-link { .hljs-link {
text-decoration: underline; text-decoration: underline;
} }
}

View File

@@ -528,7 +528,7 @@
/* 代码块 */ /* 代码块 */
pre, code { pre, code {
background-color: var(--bg-color-tertiary) !important; background-color: #1D1E1F !important;
} }
/* Markdown 样式 */ /* Markdown 样式 */
@@ -1806,7 +1806,4 @@
.marked-markdown.theme-light .code-block-wrapper .code-block-body .line-numbers{ .marked-markdown.theme-light .code-block-wrapper .code-block-body .line-numbers{
@include dark-theme-div; @include dark-theme-div;
} }
} }