mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(reorder): support dynamic type (#27838)
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { configs, test } from '@utils/test/playwright';
|
||||
|
||||
configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
||||
test.describe(title('reorder-group: font scaling'), () => {
|
||||
test('should scale text on larger font sizes', async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<style>
|
||||
html {
|
||||
font-size: 36px;
|
||||
}
|
||||
</style>
|
||||
<ion-reorder-group disabled="false">
|
||||
<ion-item>
|
||||
<ion-label>Default Reorder</ion-label>
|
||||
<ion-reorder slot="end"></ion-reorder>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>Custom Icon</ion-label>
|
||||
<ion-reorder slot="end">
|
||||
<ion-icon name="pizza"></ion-icon>
|
||||
</ion-reorder>
|
||||
</ion-item>
|
||||
</ion-reorder-group>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const reorderGroup = page.locator('ion-reorder-group');
|
||||
|
||||
await expect(reorderGroup).toHaveScreenshot(screenshot(`reorder-group-scale`));
|
||||
});
|
||||
});
|
||||
});
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
@@ -4,7 +4,7 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Font size of the reorder icon
|
||||
$reorder-ios-icon-font-size: 34px !default;
|
||||
$reorder-ios-icon-font-size: 2.125rem !default;
|
||||
|
||||
/// @prop - Opacity of the reorder icon
|
||||
$reorder-ios-icon-opacity: .4 !default;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Font size of the reorder icon
|
||||
$reorder-md-icon-font-size: 31px !default;
|
||||
$reorder-md-icon-font-size: 1.9375rem !default;
|
||||
|
||||
/// @prop - Opacity of the reorder icon
|
||||
$reorder-md-icon-opacity: .3 !default;
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
|
||||
.reorder-icon {
|
||||
display: block;
|
||||
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
/**
|
||||
* This ensures that custom reorder
|
||||
* icons resize with Dynamic Type.
|
||||
*/
|
||||
::slotted(ion-icon) {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user