diff --git a/core/src/components/menu/menu.scss b/core/src/components/menu/menu.scss index 83536250d0a..54cc316d6ab 100644 --- a/core/src/components/menu/menu.scss +++ b/core/src/components/menu/menu.scss @@ -190,13 +190,12 @@ ion-backdrop { width: auto; - /* stylelint-disable declaration-no-important */ - transform: none !important; + transform: none; - box-shadow: none !important; + box-shadow: none; } :host(.menu-pane-visible) ion-backdrop { + /* stylelint-disable-next-line declaration-no-important */ display: hidden !important; - /* stylelint-enable declaration-no-important */ } diff --git a/core/src/components/menu/test/custom/menu.e2e.ts b/core/src/components/menu/test/custom/menu.e2e.ts new file mode 100644 index 00000000000..9ed734353ca --- /dev/null +++ b/core/src/components/menu/test/custom/menu.e2e.ts @@ -0,0 +1,65 @@ +import { expect } from '@playwright/test'; +import { configs, test } from '@utils/test/playwright'; + +/** + * This behavior does not vary across directions. + */ +configs({ directions: ['ltr'] }).forEach(({ title, config, screenshot }) => { + test.describe(title('menu: custom'), () => { + test('should allow styling the menu box shadow when inside a split pane', async ({ page }) => { + test.info().annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/21530', + }); + + await page.setContent( + ` + + + + + + + + Menu + + + + Menu Content + + +
+ + + + + + + Content + + + + Main Content +
+
+
+ `, + config + ); + + const app = page.locator('ion-app'); + + await expect(app).toHaveScreenshot(screenshot(`menu-custom-split-pane`)); + }); + }); +}); diff --git a/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..4cddf8de6b5 Binary files /dev/null and b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..3cf4b00487b Binary files /dev/null and b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-ios-ltr-Mobile-Safari-linux.png b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..1a166b29955 Binary files /dev/null and b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-md-ltr-Mobile-Chrome-linux.png b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..fa0060c175d Binary files /dev/null and b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-md-ltr-Mobile-Firefox-linux.png b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..a7d8086d36f Binary files /dev/null and b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-md-ltr-Mobile-Safari-linux.png b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..1c84de64f69 Binary files /dev/null and b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/split-pane/split-pane.scss b/core/src/components/split-pane/split-pane.scss index 6cdf35b3372..15eaee83734 100644 --- a/core/src/components/split-pane/split-pane.scss +++ b/core/src/components/split-pane/split-pane.scss @@ -43,8 +43,7 @@ position: relative; - /* stylelint-disable-next-line declaration-no-important */ - box-shadow: none !important; + box-shadow: none; z-index: 0; }