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

[4.0.0-beta.6] css Range does not properly fit #15393

Closed goelectricstations closed 5 years ago

goelectricstations commented 6 years ago

Ionic:

ionic (Ionic CLI) : 4.1.1 (C:\Users\Computer\AppData\Roaming\npm\node_modules\ionic) Ionic Framework : @ionic/angular 4.0.0-beta.6 @angular-devkit/core : 0.7.5 @angular-devkit/schematics : 0.7.5 @angular/cli : 6.1.5 @ionic/ng-toolkit : 1.0.0 @ionic/schematics-angular : 1.0.1

Cordova:

cordova (Cordova CLI) : 8.0.0 Cordova Platforms : android 7.1.0, ios 4.5.4 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 1.2.1, (and 11 other plugins)

System:

NodeJS : v8.9.4 (C:\Program Files\nodejs\node.exe) npm : 6.3.0-next.0 OS : Windows 10

Range does not properly fit image

  <ion-item>
      <ion-range min="-200" max="200" color="secondary">
        <ion-label slot="start">-200</ion-label>
        <ion-label slot="end">200</ion-label>
      </ion-range>
    </ion-item>
mhartington commented 6 years ago

This looks to be an issue with the flex properties of the labels and range-slider. Will look into this.

goelectricstations commented 6 years ago

@mhartington

this fix the issue:

ion-range > ion-label { flex: initial !important; }

brandyscarney commented 5 years ago

I've confirmed this issue still exists in latest. The following CSS is not being applied: https://github.com/ionic-team/ionic/blob/master/core/src/components/range/range.scss#L30-L32

I can fix this by moving the code to label, but I'm not sure if this is the right solution:

:host-context(ion-range.in-item) {
  flex: initial;
}

cc @manucorporat

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.