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
51.02k stars 13.51k forks source link

V4 -Icon size not working #17657

Closed MInesGomes closed 5 years ago

MInesGomes commented 5 years ago

Ionic Framework : @ionic/angular 4.0.2 Bug: Doesn't resize the icon

.html <ion-icon slot="start" color="green" class="iconSize" name="warning"></ion-icon>

.scss

  .iconSize {
      font-size: 512px;
    }

ionic info:

   Ionic Framework               : @ionic/angular 4.0.2
   @angular-devkit/build-angular : 0.12.4
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.2.4
   @ionic/angular-toolkit        : 1.4.0
brandyscarney commented 5 years ago

Thanks for the issue! I'm not able to reproduce this on an icon, or an icon in an item. Judging by the slot I am guessing it is inside of another component. Could you please provide the full markup or a Codepen/repository that we can use to reproduce this? Thanks!

Here is a Codepen example using vanilla JS, but I also tried in the Angular conference app and couldn't reproduce: https://codepen.io/brandyscarney/pen/gEwbMq

MInesGomes commented 5 years ago

Thank you @brandyscarney ! It was a great help. I tried in the home page and did not give the error.... I am upgrading from 3 to 4 and the mistake was in the .scss I was putting a

page-my-modal {
.iconSize {
      font-size: 512px;
    }
}

Now is just

.iconSize {
      font-size: 512px;
    }

and works ! Sorry for the mislead issue

brandyscarney commented 5 years ago

@Entrecampos No worries! Glad it works now. 🙂

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.