glide
glide copied to clipboard
Variable widths
Hello,
Glide looks super nice... Top work.
Is it possible for each slide to have it's own width?
Cheers
https://codesandbox.io/s/4w4m7v2jq7
+1
Looks like this will not be happening anytime soon. See #163.
Any workaround for this?
+1
+1
+1
I believe that this would unfortunately involve quite a big rewrite, because internally Glide is designed to work with equal width slides. I have the same issue and will probably switch to tiny-slider, as it does not have this limitation, weighing only ~8kb more while having similar functionality.
My use case involves using only images and I need to have portrait and landscape displayed at the same height, while maintaining ratio — this is not possible at the moment because of aforementioned reason. However, if you only need to "fill" the entire slide with the picture, you might use something like
img {
height: 500px;
width: 100%;
object-fit: cover;
}
to get the "cover" effect.
:'(
in flickity u can't update options but can own your width on slides
in Glide u cant set your own width but can update Glide options
Are there any plans for adding this feature?
Would be also be open to any temporary solutions people have come up with.
my solution for partially visible second slide
.glide {
width: 255px;
.glide__track {
width: calc(100vw - 10px);
}
.glide__bullets {
left: calc(50vw - 10px);
}
}
Waiting for this cool stuff as well
This would be a great feature!
.glide__slide {
width: auto !important;
padding-left: 50px;
padding-right: 50px;
}
I used this as workaround, but the calculation seems off when moved
Probably this is a good alternative
https://flickity.metafizzy.co/options.html