-
Notifications
You must be signed in to change notification settings - Fork 13.5k
bug: thumbnail not being properly sized when slotted inside item #22935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
To expand on this with a code example for reproduction, I also tried ion-item's min-height property to make the parent (ion item) larger. It didn't work though. ion-item {
--min-height: 200px; // or any large size
}
ion-thumbnail {
--size: 108px; // this should take effect but doesn't
--border-radius: 12px;
} <ion-item>
<ion-thumbnail slot="start">
<img src="path"/>
</ion-thumbnail>
</ion-item> |
As a workaround, I directly set the height and width of the
|
Still an issue in Ionic 6.19.0 |
resolves #22935 --------- Co-authored-by: ionitron <hi@ionicframework.com> Co-authored-by: liamdebeasi <liamdebeasi@users.noreply.github.com>
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. |
Bug Report
Ionic version:
[x] 5.x
Current behavior:
The ionic docs says :
But when a ion-thumbnail is inside a ion-item and slotted, it doesn't fit the ion-item, instead it forces its size to 56px which makes the ion-item height 56px.
If we want to make the thumbnail smaller we can use the --size attribute, but it is overridden by the code above when slotted.
I add the size attribute :

The ion-thumbnail size attribute is overridden by the slotted css :
Expected behavior:
The size attribute shouldn't be overridden ?
Why force the height/width to 56px when slotted ?
Steps to reproduce:
Go to : https://ionicframework.com/docs/api/thumbnail
The text was updated successfully, but these errors were encountered: