Skip to content
Discussion options

You must be logged in to vote

Hi,

So, you wish that images would fill all available screen while maintaining image aspect ratio? You could do the other way - set

Image : {
  fit: 'cover'
}

but then overwrite CSS:

.has-image[data-image-fit=cover]  .fancybox__image {
    object-fit: contain !important;
}

https://jsfiddle.net/gjf7d6rw/

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rrrpdx
Comment options

Answer selected by rrrpdx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants