Skip to content

Commit d73faf5

Browse files
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. -->
1 parent f6ce023 commit d73faf5

12 files changed

+19
-1
lines changed

core/src/components/backdrop/backdrop.ionic.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33

44
:host {
55
background-color: rgba(globals.$ion-primitives-base-black-rgb, 0.7);
6-
backdrop-filter: blur(2px);
76
}
-469 Bytes
Loading
-447 Bytes
Loading
-469 Bytes
Loading
-458 Bytes
Loading

core/src/components/modal/test/sheet/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@
143143
>
144144
Backdrop is inactive
145145
</button>
146+
<button
147+
id="backdrop-hidden"
148+
onclick="presentModal({ backdropBreakpoint: 0.5, initialBreakpoint: 0.3, breakpoints: [0.3, 0.5, 0.7, 1], showBackdrop: false })"
149+
>
150+
Backdrop is hidden
151+
</button>
146152

147153
<button
148154
id="half-sheet"

core/src/components/modal/test/sheet/modal.e2e.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,19 @@ configs({ modes: ['ionic-md'], directions: ['ltr'] }).forEach(({ title, screensh
4747
});
4848
});
4949
});
50+
51+
test.describe(title('sheet modal: backdrop hidden'), () => {
52+
test('should not have visual regressions', async ({ page }) => {
53+
await page.goto('/src/components/modal/test/sheet', config);
54+
const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent');
55+
56+
await page.click('#backdrop-hidden');
57+
58+
await ionModalDidPresent.next();
59+
60+
await expect(page).toHaveScreenshot(screenshot(`modal-backdrop-hidden`), { animations: 'allow' });
61+
});
62+
});
5063
});
5164

5265
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
40.2 KB
Loading
52.3 KB
Loading
35 KB
Loading

0 commit comments

Comments
 (0)