Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions core/src/components/item-divider/item-divider.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,11 @@
height: $item-md-avatar-height;
}


// Material Design Item Divider Thumbnail
// --------------------------------------------------

::slotted(ion-thumbnail) {
width: $item-md-thumbnail-width;
height: $item-md-thumbnail-height;
--size: #{$item-md-thumbnail-size};
}

// Material Design Item Divider Avatar/Thumbnail
Expand Down
12 changes: 8 additions & 4 deletions core/src/components/item/item.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -154,20 +154,24 @@
font-size: 13px;
}


// iOS Item Avatar & Thumbnail
// iOS Item Avatar
// --------------------------------------------------

::slotted(ion-avatar) {
width: $item-ios-avatar-width;
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));
Expand Down
7 changes: 2 additions & 5 deletions core/src/components/item/item.ios.vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 1 addition & 4 deletions core/src/components/item/item.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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
// --------------------------------------------------

Expand All @@ -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
Expand Down
7 changes: 2 additions & 5 deletions core/src/components/item/item.md.vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
20 changes: 20 additions & 0 deletions core/src/components/thumbnail/test/basic/thumbnail.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,24 @@ test.describe('thumbnail: basic', () => {

await expect(referenceEl).toHaveScreenshot(`thumbnail-ion-item-diff-${page.getSnapshotSettings()}.png`);
});

test('size should be customizable in <ion-item>', async ({ page, skip }) => {
skip.rtl();

test.info().annotations.push({
type: 'issue',
description: 'https://github.com/ionic-team/ionic-framework/issues/22935',
});

await page.setContent(`
<ion-item>
<ion-thumbnail style="--size: 20px">
<img src="/src/components/thumbnail/test/thumbnail.svg" />
</ion-thumbnail>
</ion-item>
`);

const item = page.locator('ion-item');
await expect(item).toHaveScreenshot(`thumbnail-ion-item-size-diff-${page.getSnapshotSettings()}.png`);
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.