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

fit image to #baguetteBox-overlay .full-image instead of using "data-at-xxxx" #241

Open
VadimKalinin opened this issue Sep 1, 2020 · 0 comments

Comments

@VadimKalinin
Copy link

Hello, feimosi.
Thank you for baguetteBox.js.
For some reason I don't want to have multiple copies of the same image, but want to see image in lightbox with maximum size.
For this purpose I propose to change some css properties #baguetteBox-overlay .full-image img object:
width:80%
height:80%
max-width, max-height - delete
object-fit:contain, object-position:center - add

This will allow to fit a image with a relatively small size into the lightbox instead of creating several image copies with different sizes. If the original image has sufficient size and resolution, then in some cases this will be enough.
Maybe you consider it possible to add a new custom option like "fit".

With best regards, Vadim from Ukraine

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

1 participant