Skip to content

Commit

Permalink
style(docs): use github-dark hightlight theme
Browse files Browse the repository at this point in the history
Use the `github-dark` highlight theme for fence blocks in vitepress,
instead of the default `material-palenight` theme.

This increases the contrast ratio of `#comments` from 2.75:1 to 4.43:1,
which is a lot more visible.

It still doesn't reach WCAG 2.0 level AA contrast standards,
which requires 4.5:1 as a minimum constrast ratio, but 4.43:1 is
pretty close, and we don't need to manually modify the theme's colours.
  • Loading branch information
aloisklink committed Nov 17, 2022
1 parent 59153e7 commit 47c91f3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/mermaid/src/docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { MermaidMarkdown } from 'vitepress-plugin-mermaid';
import { defineConfig, MarkdownOptions } from 'vitepress';

const allMarkdownTransformers: MarkdownOptions = {
// the shiki theme to highlight code blocks
theme: "github-dark",
config: async (md) => {
await MermaidExample(md);
MermaidMarkdown(md);
Expand Down

0 comments on commit 47c91f3

Please sign in to comment.