Owlcarousel2: Use Flexbox

Created on 24 Aug 2015  路  9Comments  路  Source: OwlCarousel2/OwlCarousel2

please, use flexbox in the owl-carousel to align items vertically or horizontally. this is a new era of Flexbox. several plugins are starting to use it. (Eg: swiper)
would be really amazing if OwlCarousel Add this resource.

Most helpful comment

You're awesome @daviddeutsch and I never intend to offend or bother. Keep up the awesomeness 馃槂 I do agree with you: the library should provide a carousel for as many use cases as possible and users of that library should customize as needed. I do look forward to v2.5 though 馃槣

All 9 comments

Sorry, but from personal experience, flexbox is not as cross-browser compatible as would be necessary for a library inclusion.

I use Flexbox with Owl Carousel with my own CSS so it's not a big deal to me if it's not added with the plugin. But your reasoning, @daviddeutsch, I disagree with. Standard support for major browsers should be current and one back and/or as far back as the major browser team supports鈥攚hichever is less. See Microsoft's announcement. And, of course, browser support: Can I Use Flexbox. I respect your decision 100% but not your reasoning. I'm just a crusader for Flexbox 馃檪 Thanks so much, again, for taking of the OwlCarousel2 repository! Keep up the awesome work. I depend on Owl Carousel 2! 馃槂

I'm absolutely, totally with you on how awesome and necessary flexbox is. It's just that I've spent a lot of developer hours making it work across browsers and the best you can get is around 97-98%ish, with some autoprefixer superglue and modernizr fallbacks. It's the way to go for a _project_, but not so much for a _library_.

The good thing is that, for a carousel, you don't need something like flex-wrap, which is usually the biggest headache.

It's definitely on my list, but more like... for Version 2.5. Actually, I think I might have a ticket coming up at work some time where I might need to have a flexbox mode...

Aw whatever, I'll keep this open until I get to it.

You're awesome @daviddeutsch and I never intend to offend or bother. Keep up the awesomeness 馃槂 I do agree with you: the library should provide a carousel for as many use cases as possible and users of that library should customize as needed. I do look forward to v2.5 though 馃槣

@dallanlee: I'm curious to know how do you use Flexbox and to see which result you get with it. I'm trying to make a vertical scroll but still did not got it.

I am using it in Angular and using Angular Flex Layout. It's still early, but it seems to work. I am using horizontal carousel. The trick is to set the max-width of the carousel container/div.

@sinyayadynya Adding .owl-stage { display: flex; flex-direction: row; } seems to work quite well, at least in my case.

closing, use https://glidejs.com/ instead owl.

Yeah鈥aybe put a notice on owlcarousel2.github.io/OwlCarousel2 home page and documentation? Had no idea it had been discontinued until yesterday.

Was this page helpful?
0 / 5 - 0 ratings