We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have 16:9 images that needs to be cropped 1:1 on an image grid. The problem is that the grid is responsive, so setting a height is not possible.
What I do in these cases is set the image as a background and a padding-top: 100% to the container. That creates a responsive square.
padding-top: 100%
Now, if I don't set a height and just use padding-top, the container height is 0 so the plugin doesn't work. But if I change this:
height
var containerH = $el.height();
To this:
var containerH = $el.outerHeight();
Everything works as expected.
Is there any other way to solve my problem? That change might break something? I'm using v1.1.3.
Thanks, azeos.
The text was updated successfully, but these errors were encountered:
I think that should be fine. Here is a similar problem: #55 feel free to open a pull request with your solution if you like.
Sorry, something went wrong.
No branches or pull requests
I have 16:9 images that needs to be cropped 1:1 on an image grid. The problem is that the grid is responsive, so setting a height is not possible.
What I do in these cases is set the image as a background and a
padding-top: 100%
to the container. That creates a responsive square.Now, if I don't set a height and just use padding-top, the container
height
is 0 so the plugin doesn't work. But if I change this:To this:
Everything works as expected.
Is there any other way to solve my problem? That change might break something?
I'm using v1.1.3.
Thanks,
azeos.
The text was updated successfully, but these errors were encountered: