Reputation: 2342
Too much padding on the right side of my ion list.
I was able to decrease padding on left side with
padding: 0 0 0 0 !important;
But cannot find any way to affect the right side.
<ion-list class="wrapping-list">
<ion-item *ngFor="let listItem of list; let i = index" no-padding row-no-padding (click)="seeListItem(i)" (long-press)="longPressListItem(i)" (swipe-left)="swipeLeftItem(i)">
<ion-avatar item-left>
<img width="30px" height="30px" src="{{listItem.thumbnail}}" />
</ion-avatar>
<h2>{{ listItem.name }} </h2>
<p>{{ listItem.summary }} </p>
</ion-item>
</ion-list>
Here is everything I tried with CSS:
.wrapping-list .item-content, .wrapping-list .item {
overflow: initial;
white-space: initial;
padding: 0 0 0 0 !important;
}
.no-padding {
padding: 0 0 0 0 !important;
}
.item-complex .item-content {
padding: 0 0 0 0 !important;
}
.item-right
{
padding: 0 0 0 0 !important;
margin: 0 0 0 0 !important;
}
Other formatting questions:
Upvotes: 0
Views: 971
Reputation: 2342
To make it work I had to add this to app.scss:
.item-md.item-block .item-inner {
padding: 0 0 0 0 !important;
}
.label-md {
margin: 6px 8px 0px 0;
}
and create a custom css file for the page with this in it:
.item-md [item-left] {
margin: 0px 0px 0px 4;
}
.item-md [item-right] {
margin: 0px 0px 0px 0;
}
When I moved the stuff in app.scss to the other css file it didn't work for some reason.
Upvotes: 1