Skip to content

Commit 2b4b30b

Browse files
committed
fix(thumbnail): use correct tokens
1 parent 6b24703 commit 2b4b30b

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

BREAKING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,17 @@ The following breaking changes apply to `ion-thumbnail`:
268268
> [!NOTE]
269269
> Code that previously set `--size: 48px` on `ion-thumbnail` must now set both `--ion-thumbnail-width: 48px` and `--ion-thumbnail-height: 48px`.
270270
271+
<h5>Slotted inside `ion-item` or `ion-item-divider`</h5>
272+
273+
When `ion-thumbnail` is slotted inside a parent component, the parent owns the sizing.
274+
275+
Use the **parent's** thumbnail tokens instead:
276+
277+
| Context | New token (global) | New CSS variable (component-specific) |
278+
|---|---|---|
279+
| Inside `ion-item` | `IonItem.thumbnail.width` / `IonItem.thumbnail.height` | `--ion-item-thumbnail-width` / `--ion-item-thumbnail-height` |
280+
| Inside `ion-item-divider` | `IonItemDivider.thumbnail.width` / `IonItemDivider.thumbnail.height` | `--ion-item-divider-thumbnail-width` / `--ion-item-divider-thumbnail-height` |
281+
271282
<h5>Theme classes</h5>
272283

273284
Remove any instances that target the theme classes: `ion-thumbnail.md`, `ion-thumbnail.ios`.

core/src/components/thumbnail/test/basic/thumbnail.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, c
2323
await page.setContent(
2424
`
2525
<style>
26-
ion-thumbnail {
26+
ion-item {
2727
--ion-item-thumbnail-width: 20px;
2828
--ion-item-thumbnail-height: 20px;
2929
}

0 commit comments

Comments
 (0)