feat(toolbar): support dynamic type (#28073)

This commit is contained in:
Liam DeBeasi
2023-08-30 07:44:24 -05:00
committed by GitHub
parent 9e5f732a5e
commit e4cc457f57
9 changed files with 22 additions and 6 deletions

View File

@@ -168,7 +168,7 @@
:host-context(ion-toolbar) {
@include padding(1px, null, 15px, null);
height: 52px;
min-height: 52px;
}
// Searchbar in Toolbar Color

View File

@@ -20,5 +20,26 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
await expect(searchbar).toHaveScreenshot(screenshot(`searchbar-scale`));
});
test('should scale text on larger font sizes in a toolbar', async ({ page }) => {
await page.setContent(
`
<style>
html {
font-size: 36px;
}
</style>
<ion-header>
<ion-toolbar>
<ion-searchbar value="My Text" show-cancel-button="always" show-clear-button="always"></ion-searchbar>
</ion-toolbar>
</ion-header>
`,
config
);
const searchbar = page.locator('ion-searchbar');
await expect(searchbar).toHaveScreenshot(screenshot(`searchbar-scale-toolbar`));
});
});
});

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -48,11 +48,6 @@
@include margin(3px, null, null, null);
}
:host(.toolbar-searchbar) ::slotted(ion-back-button) {
height: 38px;
}
// iOS Toolbar Slot Placement
// --------------------------------------------------