fix(item): use thumbnail's size when present (#27014)

resolves #22935

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: liamdebeasi <liamdebeasi@users.noreply.github.com>
This commit is contained in:
Maria Hutt
2023-03-24 11:32:14 -07:00
committed by GitHub
parent 3b99c31bab
commit 6cecdf4145
12 changed files with 34 additions and 21 deletions

View File

@ -154,8 +154,7 @@
font-size: 13px;
}
// iOS Item Avatar & Thumbnail
// iOS Item Avatar
// --------------------------------------------------
::slotted(ion-avatar) {
@ -163,11 +162,16 @@
height: $item-ios-avatar-height;
}
// iOS Item Thumbnail
// --------------------------------------------------
::slotted(ion-thumbnail) {
width: $item-ios-thumbnail-width;
height: $item-ios-thumbnail-height;
--size: #{$item-ios-thumbnail-size};
}
// iOS Item Avatar/Thumbnail
// --------------------------------------------------
::slotted(ion-avatar[slot="end"]),
::slotted(ion-thumbnail[slot="end"]) {
@include margin(($item-ios-padding-end * 0.5));

View File

@ -33,11 +33,8 @@ $item-ios-avatar-width: 36px !default;
/// @prop - Height of the avatar in the item
$item-ios-avatar-height: $item-ios-avatar-width !default;
/// @prop - Width of the thumbnail in the item
$item-ios-thumbnail-width: 56px !default;
/// @prop - Height of the thumbnail in the item
$item-ios-thumbnail-height: $item-ios-thumbnail-width !default;
/// @prop - Size of the thumbnail in the item
$item-ios-thumbnail-size: 56px !default;
/// @prop - Color of the detail arrow icon
$item-ios-detail-icon-color: $item-ios-border-color !default;

View File

@ -258,7 +258,6 @@
@include padding-horizontal($item-md-note-end-slot-padding-start, $item-md-note-end-slot-padding-end);
}
// Material Design Item Avatar
// --------------------------------------------------
@ -267,13 +266,11 @@
height: $item-md-avatar-height;
}
// Material Design Item Thumbnail
// --------------------------------------------------
::slotted(ion-thumbnail) {
width: $item-md-thumbnail-width;
height: $item-md-thumbnail-height;
--size: #{$item-md-thumbnail-size};
}
// Material Design Item Avatar/Thumbnail

View File

@ -18,11 +18,8 @@ $item-md-avatar-width: 40px !default;
/// @prop - Height of the avatar in the item
$item-md-avatar-height: $item-md-avatar-width !default;
/// @prop - Width of the thumbnail in the item
$item-md-thumbnail-width: 56px !default;
/// @prop - Height of the thumbnail in the item
$item-md-thumbnail-height: $item-md-thumbnail-width !default;
/// @prop - Size of the thumbnail in the item
$item-md-thumbnail-size: 56px !default;
/// @prop - Color of the detail arrow icon
$item-md-detail-icon-color: $item-md-border-color !default;