Skip to main content

If you have upgraded Ionic to 5 or 6 you will have experienced that the padding attribute is not working anymore.

<ion-content padding *ngIf="loaded" color="medium">

Use of attributes was deprecated in Ionic v4.  If you would have noticed in developers console, Ionic 4 was presenting warnings of using these attributes.  So post Ionic 4, these attributes were transitioned to CSS classes.

Now use these 'classes' as follows

<ion-content class="ion-padding" *ngIf="loaded" color="medium">