-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(icon): support for dynamic type (#1246)
- Loading branch information
1 parent
b123558
commit 45c04dd
Showing
8 changed files
with
57 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { expect } from '@playwright/test'; | ||
import { test } from '../../../utils/test/playwright'; | ||
|
||
test.describe('icon: dynamic type', () => { | ||
|
||
test.beforeEach(async ({ page }) => { | ||
await page.goto('/test/dynamic-type'); | ||
}); | ||
|
||
test('should scale text on larger font sizes', async ({ page }) => { | ||
// Wait for all SVGs to be lazily loaded before taking screenshots | ||
await page.waitForLoadState('networkidle'); | ||
|
||
const icons = page.locator('#icons'); | ||
|
||
expect(await icons.screenshot()).toMatchSnapshot(`icon-dynamic-type-diff.png`); | ||
}); | ||
|
||
}); |
Binary file added
BIN
+7.48 KB
...namic-type/icon.e2e.ts-snapshots/icon-dynamic-type-diff-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.7 KB
...amic-type/icon.e2e.ts-snapshots/icon-dynamic-type-diff-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.33 KB
...namic-type/icon.e2e.ts-snapshots/icon-dynamic-type-diff-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html dir="ltr" lang="en" mode="ios"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" /> | ||
<meta | ||
http-equiv="Content-Security-Policy" | ||
content="default-src 'none'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com/*; img-src 'self'; connect-src 'self'; font-src https://fonts.gstatic.com/*'" | ||
/> | ||
<title>IonIcon - Dynamic Type</title> | ||
<script type="module" src="../../build/ionicons.esm.js"></script> | ||
<script nomodule src="../../build/ionicons.js"></script> | ||
<style> | ||
html { | ||
font-size: 28px; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div id="icons"> | ||
<ion-icon name="star"></ion-icon> | ||
<ion-icon name="star" size="small"></ion-icon> | ||
<ion-icon name="star" size="large"></ion-icon> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters