From b0e133fa014f043606582bedb843c5af0d7fe738 Mon Sep 17 00:00:00 2001 From: Luffy <52o@qq52o.cn> Date: Fri, 3 Jan 2025 14:43:10 +0800 Subject: [PATCH] feat: Support dark mode for zoom-image plugin --- src/plugins/zoom-image.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/zoom-image.js b/src/plugins/zoom-image.js index 9b74c953e..52e1ebef7 100644 --- a/src/plugins/zoom-image.js +++ b/src/plugins/zoom-image.js @@ -10,13 +10,17 @@ function install(hook) { ), ); + Docsify.dom.style( + `.medium-zoom-image--opened,.medium-zoom-overlay{z-index:999}`, + ); + elms = elms.filter(elm => !elm.matches('a img')); if (zoom) { zoom.detach(); } - zoom = mediumZoom(elms); + zoom = mediumZoom(elms, { background: 'var(--color-bg)' }); }); }