Skip to content

Commit

Permalink
fix: changelog backgroud color
Browse files Browse the repository at this point in the history
fix dark mode on light system
fix light mode on dark system
close #890
  • Loading branch information
Gaojianli committed Jan 16, 2025
1 parent 33d8c6a commit c5bcab2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 8 additions & 2 deletions webui/public/style/github-markdown-css.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
.markdown-body table tr {
background-color: var(--bgColor-default);
}
html {
background-color: #fff;
}
html[data-theme='dark'] {
background-color: #2a2a2b;
}
.markdown-body {
--base-size-4: 0.25rem;
--base-size-8: 0.5rem;
Expand Down Expand Up @@ -40,7 +46,7 @@
--fgColor-attention: #d29922;
--fgColor-danger: #f85149;
--fgColor-done: #ab7df8;
--bgColor-default: var(--color-bg-3);
--bgColor-default: #2a2a2b;
--bgColor-muted: #151b23;
--bgColor-neutral-muted: #656c7633;
--bgColor-attention-muted: #bb800926;
Expand Down Expand Up @@ -93,7 +99,7 @@
--fgColor-attention: #9a6700;
--fgColor-danger: #d1242f;
--fgColor-done: #8250df;
--bgColor-default: var(--color-bg-3);
--bgColor-default: #fff;
--bgColor-muted: #f6f8fa;
--bgColor-neutral-muted: #818b981f;
--bgColor-attention-muted: #fff8c5;
Expand Down
2 changes: 2 additions & 0 deletions webui/src/components/markdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ const darkStore = useDarkStore()
const srcDoc = computed(() => {
return `
<html data-theme="${darkStore.isDark ? 'dark' : 'light'}">
<link rel="stylesheet" href="./style/github-markdown-css.css"/>
<div class="markdown-body" data-theme="${darkStore.isDark ? 'dark' : 'light'}">${md.render(content)}</div>
</html>
`
})
const { content, useGithubMarkdown = false } = defineProps<{
Expand Down

0 comments on commit c5bcab2

Please sign in to comment.