From 03915f54b0e0b2f5a06997f07a2307a5b4091e03 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sun, 2 Aug 2020 12:37:01 +0200 Subject: [PATCH] Added documentation how to override code block colors --- docs/reference/code-blocks.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/reference/code-blocks.md b/docs/reference/code-blocks.md index 47523a368..4c3fbe584 100644 --- a/docs/reference/code-blocks.md +++ b/docs/reference/code-blocks.md @@ -349,6 +349,12 @@ equally well for both [color schemes][23]: * :material-checkbox-blank-circle:{: style="color: var(--md-code-hl-generic-color) " } `--md-code-hl-generic-color` * :material-checkbox-blank-circle:{: style="color: var(--md-code-hl-variable-color) " } `--md-code-hl-variable-color` +Code block foreground, background and line highlight colors are defined via: + +* :material-checkbox-blank-circle:{: style="color: var(--md-code-fg-color) " } `--md-code-fg-color` +* :material-checkbox-blank-circle:{: style="color: var(--md-code-bg-color) " } `--md-code-bg-color` +* :material-checkbox-blank-circle:{: style="color: var(--md-code-hl-color) " } `--md-code-hl-color` + Let's say you want to change the color of `#!js "strings"`. While there are several [types of string tokens][24], Material for MkDocs assigns a single color to most of them.