From c30aa6f9cfeba9697a19111d1716d46e86a33208 Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Thu, 17 Nov 2022 18:52:45 +0000 Subject: [PATCH] style(docs): use `github-dark` hightlight theme 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. --- packages/mermaid/src/docs/.vitepress/config.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/mermaid/src/docs/.vitepress/config.ts b/packages/mermaid/src/docs/.vitepress/config.ts index 7d3ec40dd..03f037584 100644 --- a/packages/mermaid/src/docs/.vitepress/config.ts +++ b/packages/mermaid/src/docs/.vitepress/config.ts @@ -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);