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. -->
This commit is contained in:
Pedro Lourenço
2025-02-24 19:16:17 +00:00
committed by GitHub
parent f6ce0230d9
commit d73faf5962
12 changed files with 19 additions and 1 deletions

View File

@ -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);
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -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"

View File

@ -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 }) => {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 27 KiB