Skip to content

Commit

Permalink
fix(site): fix some wrong colors
Browse files Browse the repository at this point in the history
  • Loading branch information
shenjunjian committed Mar 3, 2025
1 parent 0fe2122 commit bf6472a
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 61 deletions.
23 changes: 23 additions & 0 deletions examples/sites/src/assets/custom-markdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,26 @@ body .markdown-body {
--color-attention-subtle: #fff8c5;
--color-danger-fg: #cf222e;
}
.markdown-body code {
text-shadow: none !important;
}

.dark.dark .markdown-body {
background-color: #000;
}

.dark.dark .markdown-body pre {
background-color: #1a1a1a;
}

.dark.dark .markdown-body code {
color: var(--tv-color-text);

.token.operator {
background-color: transparent;
}

.hljs-string {
color: #6f42c1;
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 0 additions & 24 deletions examples/sites/src/assets/markdown.less

This file was deleted.

3 changes: 1 addition & 2 deletions examples/sites/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'prismjs/themes/prism.css'
import 'uno.css'

// highlight默认样式
import 'highlight.js/styles/default.css'
// import 'highlight.js/styles/default.css'

// 只使用markdown的亮色主题
import 'github-markdown-css/github-markdown.css'
Expand All @@ -17,7 +17,6 @@ import './style.css'
// 覆盖默认的github markdown样式
import './assets/custom-markdown.css'
import './assets/custom-block.less'
import './assets/markdown.less'
import './assets/md-preview.less'

import { i18n } from './i18n/index'
Expand Down
15 changes: 11 additions & 4 deletions examples/sites/src/views/components-doc/components/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,6 @@ onBeforeUnmount(() => {
}
}
:global(.dark .pc-demo-container.pc-demo-container) {
background-color: #1a1a1a;
border: none;
}
.pc-demo-container {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -400,3 +396,14 @@ onBeforeUnmount(() => {
padding: 20px 5px;
}
</style>

<style lang="less">
.dark .pc-demo-container.pc-demo-container {
background-color: #1a1a1a;
border: none;
}
.dark .demo-content.demo-content .demo-desc {
color: #b3b3b3;
}
</style>
17 changes: 0 additions & 17 deletions examples/sites/src/views/docs/docs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,6 @@ onMounted(() => {
}
}
.dark .docs-container .markdown-body {
background-color: #000;
}
.dark .docs-container .markdown-body pre {
background-color: #1a1a1a;
}
.dark .docs-container .markdown-body code {
text-shadow: none;
color: var(--tv-color-text);
.token.operator {
background-color: transparent;
}
}
.docs-page-anchor {
.tiny-anchor__affix {
overflow-y: auto;
Expand Down

0 comments on commit bf6472a

Please sign in to comment.