ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.93k stars 13.52k forks source link

centeredSlides doesn't work #13494

Closed jdnichollsc closed 5 years ago

jdnichollsc commented 6 years ago

Ionic version: (check one with "x") (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1) [ ] 2.x [x] 3.x [ ] 4.x

I'm submitting a ... (check one with "x") [x] bug report [ ] feature request

Current behavior: Using centeredSlides="false" doesn't work, the content of the slider is always centered.

Expected behavior: Has the content of the slider at the top.

Steps to reproduce: Create a simple slides with a list of items.

Related code:

<ion-slides *ngIf="items.length" centeredSlides="false">
        <ion-slide style="background-color: green">
            <ion-list *ngFor="let filter of items" no-margin>
                <ion-item>{{ filter.name }}</ion-item>
            </ion-list>
        </ion-slide>
</ion-slides>

Plunker (http://plnkr.co/edit/VukUsyh6NSjhuYj9nehz?p=preview)

tim-hoffmann commented 6 years ago

I can confirm this.

GeorgeL9 commented 6 years ago

+1 on this as well. my workaround:

  ion-slide{
    display: block !important;
    align-items: unset !important;
  }
jdnichollsc commented 6 years ago

On the other hand, a lot of components like the slider doesn't work well without the Ionic navigation. It would be much better if they worked without this dependence, improving the design of the framework :)

lourensdev commented 6 years ago

This is still an issue. @GeorgeL9 had the only solution, but this simply overrides the CSS instead of changing Swiper's config settings.

ionitron-bot[bot] commented 5 years ago

Thanks for the issue! We have moved the source code and issues for Ionic 3 into a separate repository. I am moving this issue to the repository for Ionic 3. Please track this issue over there.

Thank you for using Ionic!

ionitron-bot[bot] commented 5 years ago

Issue moved to: https://github.com/ionic-team/ionic-v3/issues/839