Right margin for ion-avatar in ion-item not in line with material design guidelines
See original GitHub issueBug Report
Ionic version:
[x] 4.x
Current behavior:
Right margin for ion-avatar with slot=“start” in ion-item has right margin = 32px Expected behavior:
Right margin should be 16px according to material design https://material.io/design/components/lists.html#specs
Steps to reproduce:
Example in ionic4 documentation shows the issue: https://beta.ionicframework.com/docs/components#list (Look at PREVIEW not ios example) Related code: (From ionic4 docs)
<ion-list>
<ion-item>
<ion-avatar slot="start">
<img src="/docs/assets/img/avatar-finn.png"></img>
</ion-avatar>
<ion-label>
<h2>Finn</h2>
<h3>I'm a big deal</h3>
<p>Listen, I've had a pretty messed up day...</p>
</ion-label>
</ion-item>
</ion-list>
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Right margin for ion-avatar in ion-item not in line with ...
Right margin for ion-avatar in ion-item not in line with material design ... Right margin should be 16px according to material design
Read more >ion-item: Input, Edit, or Delete iOS and Android Item Elements
Items show an inset bottom border by default. The border has padding on the left and does not appear under any content that...
Read more >ion-avatar: Circular Application Avatar Icon Component
Ion -avatars are circular application components that wrap an image or icon. They can represent a person or an object, by themselves or...
Read more >ion-input: Custom Input Value Type Styling and CSS ...
Material Design offers filled styles for an input when it is inside of an item. The fill property on the item can be...
Read more >ion-menu
ion -menu components are navigation drawers that slide in from the side of the current view. Read our framework docs for the available...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the issue! It seems the correct margin is applied to avatar, but it’s being overridden by this rule:
https://github.com/ionic-team/ionic/blob/master/core/src/components/item/item.md.scss#L89
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.