Skip to content
Open
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
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.
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.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions core/src/components/tab-button/test/states/tab-button.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,25 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, c
});
});
});

configs({ palettes: ['dark'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
test.describe(title('tab-button: states in dark palette'), () => {
test.describe('focus', () => {
test('should render correct focus state in dark palette', async ({ page }) => {
await page.setContent(
`
<ion-tab-bar style="width: 300px">
<ion-tab-button href="#" class="ion-focused">
<ion-label>Favorites</ion-label>
</ion-tab-button>
</ion-tab-bar>
`,
config
);

const tabBar = page.locator('ion-tab-bar');
await expect(tabBar).toHaveScreenshot(screenshot('tab-button-focus'));
});
});
});
});
2 changes: 2 additions & 0 deletions core/src/css/palettes/dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ $colors: (
--ion-text-color-step-900: #1a1a1a;
--ion-text-color-step-950: #0d0d0d;
--ion-item-background: #000000;
--ion-tab-bar-background-focused: #252525;
--ion-card-background: #1c1c1d;
}

Expand Down Expand Up @@ -183,6 +184,7 @@ $colors: (
--ion-item-background: #1e1e1e;
--ion-toolbar-background: #1f1f1f;
--ion-tab-bar-background: #1f1f1f;
--ion-tab-bar-background-focused: #353535;
--ion-card-background: #1e1e1e;
}
}
2 changes: 2 additions & 0 deletions core/src/css/palettes/high-contrast-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ $lightest-text-color: $text-color;
--ion-text-color-rgb: #{color-to-rgb-list($text-color)};
--ion-item-background: #000000;
--ion-card-background: #1c1c1d;
--ion-tab-bar-background-focused: #252525;

/// Only the item borders should increase in contrast
/// Borders for elements like toolbars should remain the same
Expand Down Expand Up @@ -185,6 +186,7 @@ $lightest-text-color: $text-color;
--ion-item-background: #1e1e1e;
--ion-toolbar-background: #1f1f1f;
--ion-tab-bar-background: #1f1f1f;
--ion-tab-bar-background-focused: #353535;
--ion-card-background: #1e1e1e;

/// Only the item borders should increase in contrast
Expand Down
Loading