Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(web-components): scope submenu fallback positioning to non-anchor browsers only #32000

Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
davatron5000 marked this conversation as resolved.
Show resolved Hide resolved
"type": "prerelease",
"comment": "fix: scope menu fallback positioning to non-anchor browsers only",
"packageName": "@fluentui/web-components",
"email": "[email protected]",
"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
Loading