Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$item-divider-ios-min-height: 28px !default;

/// @prop - Font size of the item
$item-divider-ios-font-size: 17px !default;
$item-divider-ios-font-size: 1.0625rem !default;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value this is set at (17px) is actually wrong when compared against native. It should be 15px (or 0.9375rem) at 100%. Something to keep in mind if you are comparing this against native.

Updating the default value is outside the scope of this feature & we have an open ticket to investigate changes for iOS 17 so we could update the font size as part of that.


/// @prop - Font weight of the item
$item-divider-ios-font-weight: 600 !default;
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/item-divider/item-divider.md.vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $item-divider-md-color: $text-color-step-600 !default;
$item-divider-md-background: $background-color !default;

/// @prop - Font size for the divider
$item-divider-md-font-size: 14px !default;
$item-divider-md-font-size: 0.875rem !default;

/// @prop - Border bottom for the divider
$item-divider-md-border-bottom: 1px solid $item-md-border-color !default;
Expand Down
27 changes: 27 additions & 0 deletions core/src/components/item-divider/test/a11y/item-divider.e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';

configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
test.describe(title('item-divider: font scaling'), () => {
test('should scale text on larger font sizes', async ({ page }) => {
await page.setContent(
`
<style>
html {
font-size: 310%;
}
</style>

<ion-item-divider>
<ion-label>Item Divider</ion-label>
</ion-item-divider>
`,
config
);

const itemDivider = page.locator('ion-item-divider');

await expect(itemDivider).toHaveScreenshot(screenshot(`item-divider-scale`));
});
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.