I am attempting to adjust the image overflow within the toolbar using the following code:
ion-header {
background: var(--ion-color-primary);
ion-toolbar {
--padding-end: 30px;
--padding-start: 30px;
--min-height: 100px;
ion-avatar {
margin: 20px auto;
height: 120px;
width: 120px;
img {
margin-top: 60%;
border: 3px solid var(--ion-color-secondary);
}
}
}
}
<ion-header>
<ion-toolbar color="primary">
<ion-buttons slot="secondary">
<ion-button>
<ion-icon slot="icon-only" size="large" name="exit"></ion-icon>
</ion-button>
</ion-buttons>
<ion-buttons slot="primary">
<ion-button>
<ion-icon slot="icon-only" size="large" name="create"></ion-icon>
</ion-button>
</ion-buttons>
<ion-avatar>
<img src="https://www.abc.net.au/news/image/8314104-1x1-940x940.jpg">
</ion-avatar>
</ion-toolbar>
</ion-header>
However, I am encountering an issue where the avatar image is cropped. Here is a visual of the problem:
https://i.sstatic.net/RnTNM.png
Is there a way to achieve the desired result without cropping the image? This is the desired outcome:
https://i.sstatic.net/J4AMV.png
Appreciate any assistance provided.