Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions core/src/components/menu/menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
}
65 changes: 65 additions & 0 deletions core/src/components/menu/test/custom/menu.e2e.ts
Original file line number Diff line number Diff line change
@@ -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(
`
<style>
ion-split-pane {
--side-width: 200px;
--side-min-width: 200px;
}

ion-menu {
box-shadow: 10px 5px 5px red;
z-index: 1;
}
</style>

<ion-app>
<ion-split-pane when="xs" id="splitPane" content-id="split-content">
<ion-menu side="start" content-id="split-content">
<ion-header>
<ion-toolbar color="secondary">
<ion-title>Menu</ion-title>
</ion-toolbar>
</ion-header>

<ion-content class="ion-padding">Menu Content</ion-content>
</ion-menu>

<div class="ion-page" id="split-content">
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<ion-menu-button></ion-menu-button>
</ion-buttons>

<ion-title>Content</ion-title>
</ion-toolbar>
</ion-header>

<ion-content class="ion-padding">Main Content</ion-content>
</div>
</ion-split-pane>
</ion-app>
`,
config
);

const app = page.locator('ion-app');

await expect(app).toHaveScreenshot(screenshot(`menu-custom-split-pane`));
});
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions core/src/components/split-pane/split-pane.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@

position: relative;

/* stylelint-disable-next-line declaration-no-important */
box-shadow: none !important;
box-shadow: none;
z-index: 0;
}

Expand Down