feat(loading): support for dynamic type (#27828)

This commit is contained in:
Liam DeBeasi
2023-07-25 11:01:39 -04:00
committed by GitHub
parent 914c6f2c10
commit 648d06aa2b
9 changed files with 28 additions and 2 deletions

View File

@@ -4,7 +4,7 @@
// --------------------------------------------------
/// @prop - Font size of the loading wrapper
$loading-ios-font-size: 14px !default;
$loading-ios-font-size: 0.875rem !default;
/// @prop - Padding top of the loading wrapper
$loading-ios-padding-top: 24px !default;

View File

@@ -4,7 +4,7 @@
// --------------------------------------------------
/// @prop - Font size of the loading wrapper
$loading-md-font-size: 14px !default;
$loading-md-font-size: 0.875rem !default;
/// @prop - Padding top of the loading wrapper
$loading-md-padding-top: 24px !default;

View File

@@ -30,3 +30,29 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
});
});
});
configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
test.describe(title('loading: font scaling'), () => {
test('should scale text on larger font sizes', async ({ page }) => {
await page.setContent(
`
<style>
html {
font-size: 36px;
}
</style>
<ion-loading message="Loading"></ion-loading>
`,
config
);
const ionLoadingDidPresent = await page.spyOnEvent('ionLoadingDidPresent');
const loading = page.locator('ion-loading');
await loading.evaluate((el: HTMLIonLoadingElement) => el.present());
await ionLoadingDidPresent.next();
await expect(loading).toHaveScreenshot(screenshot(`loading-scale`));
});
});
});

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB