Skip to content

Commit 6c55a41

Browse files
authored
Merge branch 'next' into ROU-11977-v2
2 parents 221a4dd + 5da9cc6 commit 6c55a41

10 files changed

+19
-6
lines changed

core/src/components.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,7 +1460,7 @@ export namespace Components {
14601460
*/
14611461
"theme"?: "ios" | "md" | "ionic";
14621462
/**
1463-
* 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.
1463+
* 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.
14641464
* @default false
14651465
*/
14661466
"translucent": boolean;
@@ -7369,7 +7369,7 @@ declare namespace LocalJSX {
73697369
*/
73707370
"theme"?: "ios" | "md" | "ionic";
73717371
/**
7372-
* 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.
7372+
* 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.
73737373
* @default false
73747374
*/
73757375
"translucent"?: boolean;

core/src/components/header/header.ionic.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,16 @@ ion-toolbar + ion-toolbar {
2121
--padding-start: #{globals.$ion-space-400};
2222
--padding-end: #{globals.$ion-space-400};
2323
}
24+
25+
@supports (backdrop-filter: blur(0)) {
26+
.header-background {
27+
@include globals.position(0, 0, 0, 0);
28+
29+
position: absolute;
30+
31+
backdrop-filter: saturate(180%) blur(globals.$ion-scale-100);
32+
}
33+
.header-translucent-ionic ion-toolbar {
34+
--opacity: 0.7;
35+
}
36+
}

core/src/components/header/header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class Header implements ComponentInterface {
5555

5656
/**
5757
* If `true`, the header will be translucent.
58-
* Only applies when the theme is `"ios"` and the device supports
58+
* Only applies when the theme is `"ios"` or `"ionic"` and the device supports
5959
* [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
6060
*
6161
* Note: In order to scroll content behind the header, the `fullscreen`
@@ -240,7 +240,7 @@ export class Header implements ComponentInterface {
240240
}}
241241
{...inheritedAttributes}
242242
>
243-
{theme === 'ios' && translucent && <div class="header-background"></div>}
243+
{theme !== 'md' && translucent && <div class="header-background"></div>}
244244
<slot></slot>
245245
</Host>
246246
);

core/src/components/header/test/fade/header.e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { expect } from '@playwright/test';
22
import { configs, test } from '@utils/test/playwright';
33

44
/**
5-
* Translucent effect is only available in iOS mode.
5+
* Translucent effect is only available in iOS and Ionic mode.
66
*/
7-
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
7+
configs({ modes: ['ios', 'ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
88
test.describe(title('header: fade'), () => {
99
test('should not have visual regressions with fade header', async ({ page }) => {
1010
await page.goto('/src/components/header/test/fade', config);
10.2 KB
Loading
15.4 KB
Loading
10.6 KB
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)