glide icon indicating copy to clipboard operation
glide copied to clipboard

Variable widths

Open magicspon opened this issue 7 years ago • 15 comments

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

magicspon avatar May 16 '18 12:05 magicspon

+1

claudiopedrom avatar Jul 24 '18 16:07 claudiopedrom

Looks like this will not be happening anytime soon. See #163.

McWatt avatar Aug 03 '18 18:08 McWatt

Any workaround for this?

Onidzuka avatar Sep 10 '18 18:09 Onidzuka

+1

danielbenjamins avatar Mar 21 '19 19:03 danielbenjamins

+1

manzoliric avatar Mar 21 '19 21:03 manzoliric

+1

mi2oon avatar May 16 '19 19:05 mi2oon

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.

andrei-dracea avatar May 24 '19 00:05 andrei-dracea

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.

andrei-dracea avatar May 24 '19 00:05 andrei-dracea

:'(

sadeghbarati avatar Feb 21 '20 12:02 sadeghbarati

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

sadeghbarati avatar Feb 21 '20 12:02 sadeghbarati

Are there any plans for adding this feature?

Would be also be open to any temporary solutions people have come up with.

asharron avatar Mar 16 '20 12:03 asharron

my solution for partially visible second slide

.glide {
    width: 255px;
    .glide__track {
        width: calc(100vw - 10px);
    }
    .glide__bullets {
        left: calc(50vw - 10px);
    }
}

dddeeemmmooonnn avatar Apr 20 '20 16:04 dddeeemmmooonnn

Waiting for this cool stuff as well

shestakov-vladyslav avatar Feb 01 '21 10:02 shestakov-vladyslav

This would be a great feature!

DanielYorwarthAthlon avatar Mar 29 '22 11:03 DanielYorwarthAthlon

.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

nickwanhere avatar Apr 07 '22 00:04 nickwanhere