fix(backdrop): remove blur effect for ionic theme (#30208)
Issue number internal --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? On the Ionic theme, ion-backdrop has a blur effect whenever it is visible or hidden. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> On the Ionic theme, ion-backdrop no longer has a blur effect regardless of its state. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
@ -3,5 +3,4 @@
|
|||||||
|
|
||||||
:host {
|
:host {
|
||||||
background-color: rgba(globals.$ion-primitives-base-black-rgb, 0.7);
|
background-color: rgba(globals.$ion-primitives-base-black-rgb, 0.7);
|
||||||
backdrop-filter: blur(2px);
|
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@ -143,6 +143,12 @@
|
|||||||
>
|
>
|
||||||
Backdrop is inactive
|
Backdrop is inactive
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
id="backdrop-hidden"
|
||||||
|
onclick="presentModal({ backdropBreakpoint: 0.5, initialBreakpoint: 0.3, breakpoints: [0.3, 0.5, 0.7, 1], showBackdrop: false })"
|
||||||
|
>
|
||||||
|
Backdrop is hidden
|
||||||
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
id="half-sheet"
|
id="half-sheet"
|
||||||
|
|||||||
@ -47,6 +47,19 @@ configs({ modes: ['ionic-md'], directions: ['ltr'] }).forEach(({ title, screensh
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test.describe(title('sheet modal: backdrop hidden'), () => {
|
||||||
|
test('should not have visual regressions', async ({ page }) => {
|
||||||
|
await page.goto('/src/components/modal/test/sheet', config);
|
||||||
|
const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent');
|
||||||
|
|
||||||
|
await page.click('#backdrop-hidden');
|
||||||
|
|
||||||
|
await ionModalDidPresent.next();
|
||||||
|
|
||||||
|
await expect(page).toHaveScreenshot(screenshot(`modal-backdrop-hidden`), { animations: 'allow' });
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
||||||
|
|||||||
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 27 KiB |