blueswen / mkdocs-glightbox

A MkDocs plugin supports image lightbox (zoom effect) with GLightbox.
https://blueswen.github.io/mkdocs-glightbox/
MIT License
115 stars 14 forks source link

[Feature Request] Support transparency #27

Closed couleurm closed 2 months ago

couleurm commented 6 months ago

Hey, would it feasible to support transparency in in images (e.g on PNGs and SVGs)? Thank you!

blueswen commented 6 months ago

Hi @couleurm. Do you mean keeping the PNG or SVG files background transparent instead of a white background?

The effect with the transparency background in the slide looks as follows:

Transparent

Currently, this plugin will add a white background automatically that looks as follows:

White
couleurm commented 6 months ago

Hi yes, how can glightbox be configured like in your first picture?

couleurm commented 6 months ago

that drop shadow makes it really explicit where the picture ends, can that also be configured? image

blueswen commented 5 months ago

Hi @couleurm,

The latest version v0.3.7 can change the slide image background and disable the slide image's shadow by plugin options. In your case, you can set the config as follows:

plugins:
   - glightbox:
       background: none
       shadow: false
couleurm commented 5 months ago

what type of value can be put in background? it'd be cool to have rgba

blueswen commented 5 months ago

You can check details on document. Any valid CSS value for background is fine.