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.94k stars 13.52k forks source link

ion-slides should take an argument to exclude the flex-box styles #15217

Closed AVatch closed 5 years ago

AVatch commented 6 years ago

Feature Request

Ionic Info Run ionic info from a terminal/cmd prompt and paste the output below.

Ionic:

   ionic (Ionic CLI)          : 4.1.0 (/usr/local/npm_packages/lib/node_modules/ionic)
   Ionic Framework            : @ionic/angular 4.0.0-beta.3
   @angular-devkit/core       : 0.7.4
   @angular-devkit/schematics : 0.7.4
   @angular/cli               : 6.1.4
   @ionic/ng-toolkit          : 1.0.6
   @ionic/schematics-angular  : 1.0.5

System:

   NodeJS : v10.7.0 (/usr/local/Cellar/node/10.7.0/bin/node)
   npm    : 6.2.0
   OS     : macOS High Sierra

Describe the Feature Request Right now when ion-slides are used a flex-box centering style is applied to the wrapper classes which forces everything to center.

This causes conflicts if you want to use the slides component for anything other than maybe some type of on-boarding material (eg. slider menus, slider-like tabs), and forces me to revert to using the raw Swiper API. With shadow-dom turned on for view encapsulation, the problem is more present.

Describe Preferred Solution A prop that allows you to not have these css styles applied.

brandyscarney commented 5 years ago

Thanks for the issue! The latest ion-slides and ion-slide components are not using shadow. You can override the styles directly using css like the following:

.swiper-slide {
  align-items: start;
}

Below is an example with the following markdown:

ion-slides {
  height: 100%;
}

.swiper-slide {
  align-items: start;
}

localhost_3334_src_components_slides_test_basic galaxy s5 1

ionitron-bot[bot] commented 5 years ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.