Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zoom overlay sits behind Docsaurus nav bar #7

Open
nomicode opened this issue May 23, 2022 · 1 comment
Open

Zoom overlay sits behind Docsaurus nav bar #7

nomicode opened this issue May 23, 2022 · 1 comment

Comments

@nomicode
Copy link

When I added your plugin to my site, I noticed that the zoom overlay appears behind the Docusaurus nav bar (which is set to z-index: 200). I was able to fix this issue with the following in my custom.css:

.medium-zoom-overlay,
.medium-zoom-image {
  z-index: 9999;
}

Perhaps it would be worthwhile to include this by default with your plugin?

@fermelone
Copy link

One way you can solve this too is adding custom options on the docusaurus.config.js:

zoom: {
    selector: '.markdown :not(em) > img',
    config: {
      // options you can specify via https://github.com/francoischalifour/medium-zoom#usage
      margin: 16,
      container: {
        top: 50 // <-- the nav bar thickness
      },
      background: {
        light: '#FFFFFF',
        dark: '#001D79'
      },
    }
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants