Skip to content

Commit

Permalink
feat: Support dark mode for zoom-image plugin (#2524)
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records authored Jan 5, 2025
1 parent c18df4c commit 5826863
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/plugins/zoom-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)' });
});
}

Expand Down

0 comments on commit 5826863

Please sign in to comment.