-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Description
Bug Report
Ionic version:
5.3.2
Current behavior:
Adding the class name ion-no-padding
has not effect. It's overwritten by .list-md
(padding-top, padding-bottom).
Expected behavior:
ion-no-padding
should work on ion-list
. Remove the padding.
Steps to reproduce:
Use the ion-list with ion-no-padding. See that the padding is not removed.
Related code:
<ion-content>
<ion-list class="ion-no-padding">
<ion-item-group>
<ion-item-divider sticky><ion-label>Demo</ion-label></ion-item-divider>
<ion-item>
<ion-icon name="bug"slot="start"></ion-icon>
<ion-label>Demo</ion-label>
</ion-item>
</ion-item-group>
</ion-list>
</ion-content>
You can see that the .md-list
is dominant. .ion-no-padding
should have !important
.
Maybe it has to do with the order of css load. I cannot reproduce in Stackblitz. But I have nothing special in my workspace. I going insane, what's wrong? Any idea? Should we use !important
? ... I have no other custom styles on it. I have no idea. It's weird. Any guess may help. ↓ Demo project below. ↓
Ionic info:
Ionic Angular (without Ionic CLI)
Demo Project
(I cannot reproduce it in Stackblitz) So please download this zip. It's a minimalist project (Angular Multi-App).
Download issue-demo.zip
Use ng serve --project=demo-app
to run this app.