diff --git a/book.toml b/book.toml index 614bac6..a9fa90f 100644 --- a/book.toml +++ b/book.toml @@ -15,3 +15,4 @@ command = "python3 tools/mdbook_zh_preprocessor.py" git-repository-url = "https://github.com/openmlsys/openmlsys-zh" mathjax-support = true preferred-dark-theme = "navy" +additional-css = ["theme/dark-mode-images.css"] diff --git a/theme/dark-mode-images.css b/theme/dark-mode-images.css new file mode 100644 index 0000000..43917b8 --- /dev/null +++ b/theme/dark-mode-images.css @@ -0,0 +1,8 @@ +/* 暗色模式下为图片添加浅灰色背景,提高透明背景图片的可读性 */ +.navy img, +.coal img, +.ayu img { + background-color: #e8e8e8; + border-radius: 4px; + padding: 8px; +}