Skip to content

Commit

Permalink
fix(web-components): scope submenu fallback positioning to non-anchor…
Browse files Browse the repository at this point in the history
… browsers only (#32000)
  • Loading branch information
davatron5000 authored Jul 15, 2024
1 parent b5fa1fa commit 8f7e877
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "fix: scope menu fallback positioning to non-anchor browsers only",
"packageName": "@fluentui/web-components",
"email": "rupertdavid@microsoft.com",
"dependentChangeType": "patch"
}
8 changes: 7 additions & 1 deletion packages/web-components/src/menu-item/menu-item.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ export const styles = css`
}
::slotted([popover]) {
align-self: start; /* Fallback for no anchor-positioning */
inset-area: inline-end span-block-end;
margin: 0;
max-height: var(--menu-max-height, auto);
Expand All @@ -168,6 +167,13 @@ export const styles = css`
::slotted([popover]:popover-open) {
inset: unset;
}
/* Fallback for no anchor-positioning */
@supports not (anchor-name: --menu-trigger) {
::slotted([popover]) {
align-self: start;
}
}
}
`.withBehaviors(
forcedColorsStylesheetBehavior(css`
Expand Down

0 comments on commit 8f7e877

Please sign in to comment.