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
4 changes: 2 additions & 2 deletions core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1460,7 +1460,7 @@ export namespace Components {
*/
"theme"?: "ios" | "md" | "ionic";
/**
* If `true`, the header will be translucent. Only applies when the theme is `"ios"` and the device supports [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility). Note: In order to scroll content behind the header, the `fullscreen` attribute needs to be set on the content.
* If `true`, the header will be translucent. Only applies when the theme is `"ios"` or `"ionic"` and the device supports [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility). Note: In order to scroll content behind the header, the `fullscreen` attribute needs to be set on the content.
* @default false
*/
"translucent": boolean;
Expand Down Expand Up @@ -7369,7 +7369,7 @@ declare namespace LocalJSX {
*/
"theme"?: "ios" | "md" | "ionic";
/**
* If `true`, the header will be translucent. Only applies when the theme is `"ios"` and the device supports [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility). Note: In order to scroll content behind the header, the `fullscreen` attribute needs to be set on the content.
* If `true`, the header will be translucent. Only applies when the theme is `"ios"` or `"ionic"` and the device supports [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility). Note: In order to scroll content behind the header, the `fullscreen` attribute needs to be set on the content.
* @default false
*/
"translucent"?: boolean;
Expand Down
13 changes: 13 additions & 0 deletions core/src/components/header/header.ionic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,16 @@ ion-toolbar + ion-toolbar {
--padding-start: #{globals.$ion-space-400};
--padding-end: #{globals.$ion-space-400};
}

@supports (backdrop-filter: blur(0)) {
.header-background {
@include globals.position(0, 0, 0, 0);

position: absolute;

backdrop-filter: saturate(180%) blur(globals.$ion-scale-100);
}
.header-translucent-ionic ion-toolbar {
--opacity: 0.7;
}
}
4 changes: 2 additions & 2 deletions core/src/components/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class Header implements ComponentInterface {

/**
* If `true`, the header will be translucent.
* Only applies when the theme is `"ios"` and the device supports
* Only applies when the theme is `"ios"` or `"ionic"` and the device supports
* [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
*
* Note: In order to scroll content behind the header, the `fullscreen`
Expand Down Expand Up @@ -239,7 +239,7 @@ export class Header implements ComponentInterface {
}}
{...inheritedAttributes}
>
{theme === 'ios' && translucent && <div class="header-background"></div>}
{theme !== 'md' && translucent && <div class="header-background"></div>}
<slot></slot>
</Host>
);
Expand Down
4 changes: 2 additions & 2 deletions core/src/components/header/test/fade/header.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';

/**
* Translucent effect is only available in iOS mode.
* Translucent effect is only available in iOS and Ionic mode.
*/
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
configs({ modes: ['ios', 'ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
test.describe(title('header: fade'), () => {
test('should not have visual regressions with fade header', async ({ page }) => {
await page.goto('/src/components/header/test/fade', config);
Expand Down
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.